From 0c3dd22b0eddc8c5454b7a6d7036af1d3ff69b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Sat, 21 Oct 2023 10:01:22 +0200 Subject: [PATCH] Missing --- czkawka_slint_gui/ui/common.slint | 5 +++ czkawka_slint_gui/ui/left_side_panel.slint | 44 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 czkawka_slint_gui/ui/common.slint create mode 100644 czkawka_slint_gui/ui/left_side_panel.slint diff --git a/czkawka_slint_gui/ui/common.slint b/czkawka_slint_gui/ui/common.slint new file mode 100644 index 0000000..20f9cab --- /dev/null +++ b/czkawka_slint_gui/ui/common.slint @@ -0,0 +1,5 @@ +export enum CurrentTab { + EmptyFolders, + EmptyFiles, + SimilarImages, +} \ No newline at end of file diff --git a/czkawka_slint_gui/ui/left_side_panel.slint b/czkawka_slint_gui/ui/left_side_panel.slint new file mode 100644 index 0000000..b3bdef0 --- /dev/null +++ b/czkawka_slint_gui/ui/left_side_panel.slint @@ -0,0 +1,44 @@ +import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox} from "std-widgets.slint"; +import {CurrentTab} from "common.slint"; + +component TabItem { + in property scanning; + in-out property active-tab; + in property text; + in property curr_tab; + + Button { + enabled: !scanning; + text: root.text; + clicked => { root.active-tab = root.curr-tab; } + } +} + +export component LeftSidePanel { + in-out property active-tab; + in-out property scanning; + + VerticalLayout { + width: 120px; + spacing: 3px; + + TabItem { + scanning: scanning; + text: "Empty Folders"; + active-tab <=> root.active-tab; + curr_tab: CurrentTab.EmptyFolders; + } + TabItem { + scanning: scanning; + text: "Empty Files"; + active-tab <=> root.active-tab; + curr_tab: CurrentTab.EmptyFiles; + } + TabItem { + scanning: scanning; + text: "Similar Images"; + active-tab <=> root.active-tab; + curr_tab: CurrentTab.SimilarImages; + } + } +} \ No newline at end of file