forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.slint
30 lines (25 loc) · 1.24 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
30
// Copyright © SixtyFPS GmbH <[email protected]>
// SPDX-License-Identifier: MIT
import { CheckBox, StandardListView } from "std-widgets.slint";
import { AboutPage, ControlsPage, EasingsPage, 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 }
export component App inherits Window {
preferred-width: 700px;
preferred-height: 500px;
title: @tr("Slint Widgets Gallery");
icon: @image-url("../../logo/slint-logo-small-light.png");
HorizontalLayout {
side-bar := SideBar {
title: @tr("Slint Widgets Gallery");
model: [@tr("Menu" => "Controls"), @tr("Menu" => "ListView"), @tr("Menu" => "TableView"), @tr("Menu" => "TextEdit"), @tr("Menu" => "Easings"), @tr("Menu" => "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) : EasingsPage {}
if(side-bar.current-item == 5) : AboutPage {}
}
}