Ab
This commit is contained in:
parent
f128dd6a88
commit
230ac9d6c7
20
czkawka_slint_gui/README.md
Normal file
20
czkawka_slint_gui/README.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# NAME_TODO
|
||||||
|
|
||||||
|
NAME_TODO is new Czkawka frontend written in Slint(written mostly in Rust) in opposite to Gtk 4 frontend which uses mostly C code.
|
||||||
|
|
||||||
|
Different
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
Slint version of app should not have any special runtime requirements - it should work on almost any OpenGL 3 capable device.
|
||||||
|
|
||||||
|
Alternatively, it can be run with software rendering.
|
||||||
|
|
||||||
|
## Compilation
|
||||||
|
Default compilation is done by `cargo build --release`.
|
||||||
|
|
||||||
|
All dependencies should be handled by cargo, except windows where you need to install m.
|
||||||
|
|
||||||
|
The only exception is building skia frontend, that require
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
|
import { StyleMetrics } from "std-widgets.slint";
|
||||||
|
|
||||||
export global ColorPalette {
|
export global ColorPalette {
|
||||||
// Tabs at left side
|
// Tabs at left side
|
||||||
in-out property<color> tab_selected_color: NativeStyleMetrics.dark-color-scheme ? red : blue;
|
in-out property<color> tab_selected_color: StyleMetrics.dark-color-scheme ? red : blue;
|
||||||
in-out property<color> tab_hovered_color: NativeStyleMetrics.dark-color-scheme ? green : yellow;
|
in-out property<color> tab_hovered_color: StyleMetrics.dark-color-scheme ? green : yellow;
|
||||||
|
|
||||||
|
// ListView
|
||||||
|
in-out property<color> list_view_normal_color: StyleMetrics.dark-color-scheme ? #474747 : #dddddd;
|
||||||
|
in-out property<color> list_view_normal_header_color: StyleMetrics.dark-color-scheme ? #292929 : #888888;
|
||||||
|
in-out property<color> list_view_normal_selected_header: StyleMetrics.dark-color-scheme ? #575757 : #cccccc;
|
||||||
}
|
}
|
|
@ -13,4 +13,11 @@ export struct ProgressToSend {
|
||||||
current_progress: int,
|
current_progress: int,
|
||||||
all_progress: int,
|
all_progress: int,
|
||||||
step_name: string,
|
step_name: string,
|
||||||
|
}
|
||||||
|
|
||||||
|
export struct MainListModel {
|
||||||
|
checked: bool,
|
||||||
|
header_row: bool,
|
||||||
|
selected: bool,
|
||||||
|
data: [string]
|
||||||
}
|
}
|
|
@ -12,7 +12,7 @@ component TabItem {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
horizontal-stretch: 1.0;
|
horizontal-stretch: 1.0;
|
||||||
background: touch-area.has-hover ? blue : green;
|
background: touch-area.has-hover ? ColorPalette.tab-hovered-color : transparent;
|
||||||
opacity: 0.05;
|
opacity: 0.05;
|
||||||
|
|
||||||
touch_area:= TouchArea {
|
touch_area:= TouchArea {
|
||||||
|
|
|
@ -2,12 +2,13 @@ import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListV
|
||||||
import {SelectableTableView} from "selectable_tree_view.slint";
|
import {SelectableTableView} from "selectable_tree_view.slint";
|
||||||
import {LeftSidePanel} from "left_side_panel.slint";
|
import {LeftSidePanel} from "left_side_panel.slint";
|
||||||
import {CurrentTab, TypeOfOpenedItem} from "common.slint";
|
import {CurrentTab, TypeOfOpenedItem} from "common.slint";
|
||||||
|
import {MainListModel} from "common.slint";
|
||||||
|
|
||||||
export component MainList {
|
export component MainList {
|
||||||
callback item_opened(string);
|
callback item_opened(string);
|
||||||
in-out property <CurrentTab> active-tab;
|
in-out property <CurrentTab> active-tab;
|
||||||
|
|
||||||
in-out property <[{checked: bool, header_row: bool, selected_row: bool, val:[string]}]> empty_folder_model;
|
in-out property <[MainListModel]> empty_folder_model;
|
||||||
in-out property <[{checked: bool, header_row: bool, selected_row: bool, val:[string]}]> empty_files_model;
|
in-out property <[{checked: bool, header_row: bool, selected_row: bool, val:[string]}]> empty_files_model;
|
||||||
in-out property <[{checked: bool, header_row: bool, selected_row: bool, val:[string]}]> similar_images_model;
|
in-out property <[{checked: bool, header_row: bool, selected_row: bool, val:[string]}]> similar_images_model;
|
||||||
|
|
||||||
|
@ -23,26 +24,26 @@ export component MainList {
|
||||||
fileNameIdx: 1;
|
fileNameIdx: 1;
|
||||||
item_opened(item) => {item_opened(item)}
|
item_opened(item) => {item_opened(item)}
|
||||||
}
|
}
|
||||||
if root.active-tab == CurrentTab.EmptyFiles: SelectableTableView {
|
// if root.active-tab == CurrentTab.EmptyFiles: SelectableTableView {
|
||||||
min-width: 200px;
|
// min-width: 200px;
|
||||||
|
|
||||||
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: [30px, 100px, 100px, 100px];
|
||||||
values <=> empty-files-model;
|
// values <=> empty-files-model;
|
||||||
parentPathIdx: 2;
|
// parentPathIdx: 2;
|
||||||
fileNameIdx: 1;
|
// fileNameIdx: 1;
|
||||||
item_opened(item) => {item_opened(item)}
|
// item_opened(item) => {item_opened(item)}
|
||||||
}
|
// }
|
||||||
if root.active-tab == CurrentTab.SimilarImages: SelectableTableView {
|
// if root.active-tab == CurrentTab.SimilarImages: SelectableTableView {
|
||||||
min-width: 200px;
|
// min-width: 200px;
|
||||||
|
|
||||||
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: [30px, 100px, 100px, 100px];
|
||||||
values <=> similar-images-model;
|
// values <=> similar-images-model;
|
||||||
parentPathIdx: 2;
|
// parentPathIdx: 2;
|
||||||
fileNameIdx: 1;
|
// fileNameIdx: 1;
|
||||||
item_opened(item) => {item_opened(item)}
|
// item_opened(item) => {item_opened(item)}
|
||||||
}
|
// }
|
||||||
}
|
}
|
|
@ -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 {TypeOfOpenedItem} from "common.slint";
|
import {TypeOfOpenedItem} from "common.slint";
|
||||||
|
import {ColorPalette} from "color_palette.slint";
|
||||||
|
|
||||||
export component SelectableTableView inherits Rectangle {
|
export component SelectableTableView inherits Rectangle {
|
||||||
callback item_opened(string);
|
callback item_opened(string);
|
||||||
|
@ -75,10 +76,7 @@ export component SelectableTableView inherits Rectangle {
|
||||||
for r[idx] in root.values : Rectangle {
|
for r[idx] in root.values : Rectangle {
|
||||||
forward-focus: focus-item;
|
forward-focus: focus-item;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
// TODO move this into singleton
|
background: r.header-row ? ColorPalette.list_view_normal_header_color : (touch-area.has-hover ? (r.selected_row ? ColorPalette.list-view-normal-selected-header : ColorPalette.list_view_normal_color) : (r.selected_row ? ColorPalette.list-view-normal-selected-header: ColorPalette.list_view_normal_color));
|
||||||
background: r.header-row ? #888888 : (touch-area.has-hover ? (r.selected_row ? #cccccc : #dddddd) : (r.selected_row ? #cccccc: #dddddd));
|
|
||||||
// background: touch-area.has-hover ? (selected ? #333333 : #222222) : (selected ? #333333: #222222);
|
|
||||||
|
|
||||||
touch_area:= TouchArea {
|
touch_area:= TouchArea {
|
||||||
forward-focus: focus-item;
|
forward-focus: focus-item;
|
||||||
clicked => {
|
clicked => {
|
||||||
|
|
Loading…
Reference in a new issue