forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery.slint
29 lines (24 loc) · 1.15 KB
/
gallery.slint
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright © SixtyFPS GmbH <[email protected]>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
import { CheckBox, StandardListView, StyleMetrics } from "std-widgets.slint";
import { AboutPage, ControlsPage, ListViewPage, TableViewPage, TableViewPageAdapter, TextEditPage } from "ui/pages/pages.slint";
import { GallerySettings } from "ui/gallery_settings.slint";
import { SideBar } from "ui/side_bar.slint";
export { TableViewPageAdapter }
component App inherits Window {
preferred-width: 700px;
preferred-height: 500px;
title: @tr("Slint Widgets Gallery");
icon: @image-url("../../logo/slint-logo-small-light-128x128.png");
HorizontalLayout {
side-bar := SideBar {
title: @tr("Slint Widgets Gallery");
model: [@tr("Controls"), @tr("ListView"), @tr("TableView"), @tr("TextEdit"), @tr("About")];
}
if(side-bar.current-item == 0) : ControlsPage {}
if(side-bar.current-item == 1) : ListViewPage {}
if(side-bar.current-item == 2) : TableViewPage {}
if(side-bar.current-item == 3) : TextEditPage {}
if(side-bar.current-item == 4) : AboutPage {}
}
}