1
0
Fork 0
mirror of synced 2024-06-15 08:54:47 +12:00
This commit is contained in:
Rafał Mikrut 2023-10-22 11:32:13 +02:00
parent 5f9ddc91e2
commit 7e7a603f4c
13 changed files with 152 additions and 64 deletions

View file

@ -12,7 +12,7 @@ jobs:
linux-cli: linux-cli:
strategy: strategy:
matrix: matrix:
toolchain: [ stable, 1.70.0 ] toolchain: [ stable, 1.72.1 ]
type: [ release ] type: [ release ]
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:

View file

@ -12,7 +12,7 @@ jobs:
linux-gui: linux-gui:
strategy: strategy:
matrix: matrix:
toolchain: [ stable, 1.70.0 ] toolchain: [ stable, 1.72.1 ]
type: [ release ] type: [ release ]
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
@ -29,7 +29,7 @@ jobs:
env: env:
CARGO_INCREMENTAL: 0 CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0" RUSTFLAGS: "-C debuginfo=0"
if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.70.0') }} if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.72.1') }}
- name: Store Linux GUI Heif - name: Store Linux GUI Heif
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View file

@ -3,7 +3,7 @@ name = "czkawka_cli"
version = "6.1.0" version = "6.1.0"
authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"] authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"]
edition = "2021" edition = "2021"
rust-version = "1.70.0" rust-version = "1.72.1"
description = "CLI frontend of Czkawka" description = "CLI frontend of Czkawka"
license = "MIT" license = "MIT"
homepage = "https://github.com/qarmin/czkawka" homepage = "https://github.com/qarmin/czkawka"

View file

@ -3,7 +3,7 @@ name = "czkawka_core"
version = "6.1.0" version = "6.1.0"
authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"] authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"]
edition = "2021" edition = "2021"
rust-version = "1.70.0" rust-version = "1.72.1"
description = "Core of Czkawka app" description = "Core of Czkawka app"
license = "MIT" license = "MIT"
homepage = "https://github.com/qarmin/czkawka" homepage = "https://github.com/qarmin/czkawka"

View file

@ -3,7 +3,7 @@ name = "czkawka_gui"
version = "6.1.0" version = "6.1.0"
authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"] authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"]
edition = "2021" edition = "2021"
rust-version = "1.70.0" rust-version = "1.72.1"
description = "GTK frontend of Czkawka" description = "GTK frontend of Czkawka"
license = "MIT" license = "MIT"
homepage = "https://github.com/qarmin/czkawka" homepage = "https://github.com/qarmin/czkawka"

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -0,0 +1,31 @@
import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox} from "std-widgets.slint";
import {SelectableTableView} from "selectable_tree_view.slint";
import {LeftSidePanel} from "left_side_panel.slint";
import {MainList} from "main_lists.slint";
import {CurrentTab} from "common.slint";
export component ActionButtons {
callback deleted;
callback scanned(CurrentTab);
in-out property <bool> scanning;
in-out property <CurrentTab> active-tab;
HorizontalBox {
height: 50px;
scan_button:= Button {
enabled: !scanning;
text: "Scan";
clicked => {
root.scanned(active-tab);
}
}
delete_button:= Button {
enabled: !scanning;
text: "Delete";
clicked => {
root.deleted();
}
}
}
}

View file

@ -17,28 +17,47 @@ component TabItem {
export component LeftSidePanel { export component LeftSidePanel {
in-out property <CurrentTab> active-tab; in-out property <CurrentTab> active-tab;
in-out property <bool> scanning; in-out property <bool> scanning;
width: 120px;
VerticalLayout { VerticalLayout {
width: 120px; spacing: 20px;
spacing: 3px; Rectangle {
height: 100px;
TabItem { Image {
scanning: scanning; width: root.width;
text: "Empty Folders"; source: @image-url("../icons/logo.png");
active-tab <=> root.active-tab; }
curr_tab: CurrentTab.EmptyFolders;
} }
TabItem { VerticalLayout {
scanning: scanning; spacing: 3px;
text: "Empty Files"; alignment: center;
active-tab <=> root.active-tab;
curr_tab: CurrentTab.EmptyFiles; 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;
}
} }
TabItem { HorizontalLayout {
scanning: scanning; height: 20px;
text: "Similar Images"; alignment: end;
active-tab <=> root.active-tab; Image {
curr_tab: CurrentTab.SimilarImages; width: 20px;
source: @image-url("../icons/settings.png");
}
} }
} }
} }

View file

@ -0,0 +1,38 @@
import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox} from "std-widgets.slint";
import {SelectableTableView} from "selectable_tree_view.slint";
import {LeftSidePanel} from "left_side_panel.slint";
import {CurrentTab} from "common.slint";
export component MainList {
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 <[{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;
// TODO - using root.active-tab in visible property will not clear model
if root.active-tab == CurrentTab.EmptyFolders: SelectableTableView {
min-width: 200px;
columns: ["Selection", "Folder Name", "Path"];
last-column: "Modification Date";
column-sizes: [30px, 100px, 100px, 100px];
values <=> empty-folder-model;
}
if root.active-tab == CurrentTab.EmptyFiles: SelectableTableView {
min-width: 200px;
columns: ["Selection", "Folder Name", "Path"];
last-column: "Modification Date";
column-sizes: [30px, 100px, 100px, 100px];
values <=> empty-files-model;
}
if root.active-tab == CurrentTab.SimilarImages: SelectableTableView {
min-width: 200px;
columns: ["Selection", "Folder Name", "Path"];
last-column: "Modification Date";
column-sizes: [30px, 100px, 100px, 100px];
values <=> similar-images-model;
}
}

View file

@ -1,12 +1,17 @@
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 {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 {MainList} from "main_lists.slint";
import {CurrentTab} from "common.slint"; import {CurrentTab} from "common.slint";
import { ActionButtons } from "action_buttons.slint";
export component MainWindow inherits Window { export component MainWindow inherits Window {
callback deleted; callback deleted;
callback scanned(CurrentTab); callback scanned(CurrentTab);
min-width: 300px; min-width: 300px;
preferred-width: 1024px;
min-height: 300px;
preferred-height: 600px;
in-out property <bool> scanning: false; in-out property <bool> scanning: false;
@ -22,6 +27,22 @@ export component MainWindow inherits Window {
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} , {checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} , {checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} , {checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: false, selected_row: false, header_row: false, val: ["witasphere", "/Xd1/Imagerren2", "25.11.1991"]} ,
{checked: true, selected_row: false, header_row: false, val: ["lokkaler", "/Xd1/Vide2", "01.23.1911"]} {checked: true, selected_row: false, header_row: false, val: ["lokkaler", "/Xd1/Vide2", "01.23.1911"]}
]; ];
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: [];
@ -31,53 +52,30 @@ export component MainWindow inherits Window {
VerticalBox { VerticalBox {
HorizontalBox { HorizontalBox {
vertical-stretch: 1.0;
// min-width: 600px; // min-width: 600px;
preferred-height: 300px; preferred-height: 300px;
LeftSidePanel { LeftSidePanel {
max-width: 10px; // Just forces the smallest possible horizontal-stretch: 0.0;
scanning: root.scanning; scanning <=> root.scanning;
active-tab <=> root.active-tab; active-tab <=> root.active-tab;
} }
// TODO - using root.active-tab in visible property will not clear model MainList {
if root.active-tab == CurrentTab.EmptyFolders: SelectableTableView { horizontal-stretch: 1.0;
min-width: 200px; active-tab <=> root.active-tab;
empty_folder_model <=> root.empty_folder_model;
columns: ["Selection", "Folder Name", "Path"]; empty_files_model <=> root.empty_files_model;
last-column: "Modification Date"; similar_images_model <=> root.similar_images_model;
column-sizes: [30px, 100px, 100px, 100px];
values <=> empty-folder-model;
}
if root.active-tab == CurrentTab.EmptyFiles: SelectableTableView {
min-width: 200px;
columns: ["Selection", "Folder Name", "Path", "Modification Date"];
values <=> empty-files-model;
}
if root.active-tab == CurrentTab.SimilarImages: SelectableTableView {
min-width: 200px;
columns: ["Selection", "Folder Name", "Path", "Modification Date"];
values <=> similar-images-model;
} }
} }
HorizontalBox { ActionButtons {
height: 50px; vertical-stretch: 0.0;
scan_button:= Button { scanning <=> root.scanning;
enabled: !scanning; active-tab <=> root.active-tab;
text: "Scan"; deleted => {root.deleted();}
clicked => { scanned(item) => {root.scanned(item);}
root.scanned(active-tab);
}
}
delete_button:= Button {
enabled: !scanning;
text: "Delete";
clicked => {
root.deleted();
}
}
} }
} }
} }

View file

@ -7,7 +7,7 @@ export component SelectableTableView inherits Rectangle {
in-out property <[length]> column_sizes: [200px, 100px, 100px, 100px]; in-out property <[length]> column_sizes: [200px, 100px, 100px, 100px];
private property <[length]> real_sizes: [0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px]; private property <[length]> real_sizes: [0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px,0px];
private property <int> column_number: 4; private property <int> column_number: column-sizes.length + 1;
in-out property <int> selected_item: -1; in-out property <int> selected_item: -1;
@ -51,8 +51,10 @@ export component SelectableTableView inherits Rectangle {
} }
list_view := ListView { list_view := ListView {
min-width: 100px; min-width: 100px;
for r[idx] in root.values : Rectangle { for r[idx] in root.values : Rectangle {
height: 30px; height: 30px;
// TODO move this into singleton
background: r.header-row ? #888888 : (touch-area.has-hover ? (r.selected_row ? #cccccc : #dddddd) : (r.selected_row ? #cccccc: #dddddd)); 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); // background: touch-area.has-hover ? (selected ? #333333 : #222222) : (selected ? #333333: #222222);

View file

@ -12,7 +12,7 @@ New versions of GTK fixes some bugs, so e.g. middle button selection will work o
| Program | Min | What for | | Program | Min | What for |
|---------|--------|--------------------------------------------------------------------------------------| |---------|--------|--------------------------------------------------------------------------------------|
| Rust | 1.70.0 | The minimum version of rust does not depend on anything, so it can change frequently | | Rust | 1.72.1 | The minimum version of rust does not depend on anything, so it can change frequently |
| GTK | 4.6 | Only for the `GTK` backend | | GTK | 4.6 | Only for the `GTK` backend |
#### Debian / Ubuntu #### Debian / Ubuntu