1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
2 | // SPDX-License-Identifier: MIT |
3 | |
4 | import { CheckBox, StandardListView, StyleMetrics } from "std-widgets.slint" ; |
5 | import { AboutPage, ControlsPage, EasingsPage, ListViewPage, TableViewPage, TableViewPageAdapter, TextEditPage } from "ui/pages/pages.slint" ; |
6 | import { GallerySettings } from "ui/gallery_settings.slint" ; |
7 | import { SideBar } from "ui/side_bar.slint" ; |
8 | |
9 | export { TableViewPageAdapter } |
10 | |
11 | component App inherits Window { |
12 | preferred-width: 700px; |
13 | preferred-height: 500px; |
14 | title: @tr("Slint Widgets Gallery" ); |
15 | icon: @image-url("../../logo/slint-logo-small-light.png" ); |
16 | |
17 | HorizontalLayout { |
18 | side-bar := SideBar { |
19 | title: @tr("Slint Widgets Gallery" ); |
20 | model: [@tr("Menu" => "Controls" ), @tr("Menu" => "ListView" ), @tr("Menu" => "TableView" ), @tr("Menu" => "TextEdit" ), @tr("Menu" => "Easings" ), @tr("Menu" => "About" )]; |
21 | } |
22 | |
23 | if(side-bar.current-item == 0) : ControlsPage {} |
24 | if(side-bar.current-item == 1) : ListViewPage {} |
25 | if(side-bar.current-item == 2) : TableViewPage {} |
26 | if(side-bar.current-item == 3) : TextEditPage {} |
27 | if(side-bar.current-item == 4) : EasingsPage {} |
28 | if(side-bar.current-item == 5) : AboutPage {} |
29 | } |
30 | } |
31 | |