1
0
Fork 0
mirror of synced 2024-06-01 18:19:46 +12:00
czkawka/czkawka_slint_gui/ui/main_window.slint
2023-10-17 21:31:08 +02:00

50 lines
1.6 KiB
Plaintext

import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox} from "std-widgets.slint";
import {SelectableTableView} from "selectable_tree_view.slint";
enum CurrentTab {
EmptyFolders,
SimilarImages,
}
export component MainWindow {
in-out property <CurrentTab> active-tab;
VerticalBox {
HorizontalBox {
width: 600px;
preferred-height: 300px;
tab_bar := VerticalLayout {
width: 120px;
spacing: 3px;
Button {
text: "Empty Folders";
clicked => { root.active-tab = CurrentTab.EmptyFolders; }
}
Button {
text: "Similar Images";
clicked => { root.active-tab = CurrentTab.SimilarImages; }
}
}
// TODO - using root.active-tab in visible property will not
if root.active-tab == CurrentTab.EmptyFolders: SelectableTableView {
columns: ["Selection", "Folder Name", "Path", "Modification Date"];
values: [
["kropkarz", "/Xd1", "24.10.2023"] ,
["witasphere", "/Xd1/Imagerren2", "25.11.1991"] ,
["lokkaler", "/Xd1/Vide2", "01.23.1911"] ,
];
}
}
HorizontalBox {
scan_button:= Button {
text: "Scan";
}
delete_button:= Button {
text: "Delete";
}
}
}
}