Id
This commit is contained in:
parent
60c5d6727e
commit
f128dd6a88
|
@ -35,7 +35,7 @@ pub fn connect_scan_button(app: &MainWindow, progress_sender: Sender<ProgressDat
|
||||||
fn scan_empty_folders(a: Weak<MainWindow>, progress_sender: Sender<ProgressData>, stop_receiver: Receiver<()>) {
|
fn scan_empty_folders(a: Weak<MainWindow>, progress_sender: Sender<ProgressData>, stop_receiver: Receiver<()>) {
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
let mut ef = EmptyFolder::new();
|
let mut ef = EmptyFolder::new();
|
||||||
ef.set_included_directory(vec![PathBuf::from("/home/rafal")]);
|
ef.set_included_directory(vec![PathBuf::from("/home/rafal/Desktop")]);
|
||||||
ef.find_empty_folders(Some(&stop_receiver), Some(&progress_sender));
|
ef.find_empty_folders(Some(&stop_receiver), Some(&progress_sender));
|
||||||
|
|
||||||
ef.get_empty_folder_list();
|
ef.get_empty_folder_list();
|
||||||
|
|
5
czkawka_slint_gui/ui/color_palette.slint
Normal file
5
czkawka_slint_gui/ui/color_palette.slint
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
export global ColorPalette {
|
||||||
|
// Tabs at left side
|
||||||
|
in-out property<color> tab_selected_color: NativeStyleMetrics.dark-color-scheme ? red : blue;
|
||||||
|
in-out property<color> tab_hovered_color: NativeStyleMetrics.dark-color-scheme ? green : yellow;
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox} from "std-widgets.slint";
|
import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox} from "std-widgets.slint";
|
||||||
import {CurrentTab} from "common.slint";
|
import {CurrentTab} from "common.slint";
|
||||||
|
import {ColorPalette} from "color_palette.slint";
|
||||||
|
|
||||||
component TabItem {
|
component TabItem {
|
||||||
in property <bool> scanning;
|
in property <bool> scanning;
|
||||||
|
@ -7,10 +8,32 @@ component TabItem {
|
||||||
in property <string> text;
|
in property <string> text;
|
||||||
in property <CurrentTab> curr_tab;
|
in property <CurrentTab> curr_tab;
|
||||||
|
|
||||||
Button {
|
|
||||||
enabled: !scanning;
|
Rectangle {
|
||||||
|
width: parent.width;
|
||||||
|
horizontal-stretch: 1.0;
|
||||||
|
background: touch-area.has-hover ? blue : green;
|
||||||
|
opacity: 0.05;
|
||||||
|
|
||||||
|
touch_area:= TouchArea {
|
||||||
|
clicked => {
|
||||||
|
root.active-tab = root.curr-tab;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HorizontalLayout {
|
||||||
|
width: parent.width;
|
||||||
|
alignment: LayoutAlignment.end;
|
||||||
|
Rectangle {
|
||||||
|
visible: (root.active-tab == root.curr-tab);
|
||||||
|
width: 5px;
|
||||||
|
background: ColorPalette.tab_selected_color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
text: root.text;
|
text: root.text;
|
||||||
clicked => { root.active-tab = root.curr-tab; }
|
width: parent.width;
|
||||||
|
horizontal-alignment: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,22 +52,25 @@ export component LeftSidePanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
spacing: 3px;
|
// spacing: 3px;
|
||||||
alignment: center;
|
alignment: center;
|
||||||
|
out property <length> element-size: 25px;
|
||||||
TabItem {
|
TabItem {
|
||||||
|
height: parent.element-size;
|
||||||
scanning: scanning;
|
scanning: scanning;
|
||||||
text: "Empty Folders";
|
text: "Empty Folders";
|
||||||
active-tab <=> root.active-tab;
|
active-tab <=> root.active-tab;
|
||||||
curr_tab: CurrentTab.EmptyFolders;
|
curr_tab: CurrentTab.EmptyFolders;
|
||||||
}
|
}
|
||||||
TabItem {
|
TabItem {
|
||||||
|
height: parent.element-size;
|
||||||
scanning: scanning;
|
scanning: scanning;
|
||||||
text: "Empty Files";
|
text: "Empty Files";
|
||||||
active-tab <=> root.active-tab;
|
active-tab <=> root.active-tab;
|
||||||
curr_tab: CurrentTab.EmptyFiles;
|
curr_tab: CurrentTab.EmptyFiles;
|
||||||
}
|
}
|
||||||
TabItem {
|
TabItem {
|
||||||
|
height: parent.element-size;
|
||||||
scanning: scanning;
|
scanning: scanning;
|
||||||
text: "Similar Images";
|
text: "Similar Images";
|
||||||
active-tab <=> root.active-tab;
|
active-tab <=> root.active-tab;
|
||||||
|
|
|
@ -17,7 +17,7 @@ export component MainList {
|
||||||
|
|
||||||
columns: ["Selection", "Folder Name", "Path"];
|
columns: ["Selection", "Folder Name", "Path"];
|
||||||
last-column: "Modification Date";
|
last-column: "Modification Date";
|
||||||
column-sizes: [30px, 100px, 100px, 100px];
|
column-sizes: [35px, 100px, 350px, 300px];
|
||||||
values <=> empty-folder-model;
|
values <=> empty-folder-model;
|
||||||
parentPathIdx: 2;
|
parentPathIdx: 2;
|
||||||
fileNameIdx: 1;
|
fileNameIdx: 1;
|
||||||
|
|
3
czkawka_slint_gui/ui/settings.slint
Normal file
3
czkawka_slint_gui/ui/settings.slint
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export global Settings {
|
||||||
|
in-out property<color> todo: blue;
|
||||||
|
}
|
Loading…
Reference in a new issue