1
0
Fork 0
mirror of synced 2024-05-17 19:03:08 +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:
strategy:
matrix:
toolchain: [ stable, 1.70.0 ]
toolchain: [ stable, 1.72.1 ]
type: [ release ]
runs-on: ubuntu-20.04
steps:

View file

@ -12,7 +12,7 @@ jobs:
linux-gui:
strategy:
matrix:
toolchain: [ stable, 1.70.0 ]
toolchain: [ stable, 1.72.1 ]
type: [ release ]
runs-on: ubuntu-22.04
steps:
@ -29,7 +29,7 @@ jobs:
env:
CARGO_INCREMENTAL: 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
uses: actions/upload-artifact@v3

View file

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

View file

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

View file

@ -3,7 +3,7 @@ name = "czkawka_gui"
version = "6.1.0"
authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"]
edition = "2021"
rust-version = "1.70.0"
rust-version = "1.72.1"
description = "GTK frontend of Czkawka"
license = "MIT"
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 {
in-out property <CurrentTab> active-tab;
in-out property <bool> scanning;
width: 120px;
VerticalLayout {
width: 120px;
spacing: 3px;
TabItem {
scanning: scanning;
text: "Empty Folders";
active-tab <=> root.active-tab;
curr_tab: CurrentTab.EmptyFolders;
spacing: 20px;
Rectangle {
height: 100px;
Image {
width: root.width;
source: @image-url("../icons/logo.png");
}
}
TabItem {
scanning: scanning;
text: "Empty Files";
active-tab <=> root.active-tab;
curr_tab: CurrentTab.EmptyFiles;
VerticalLayout {
spacing: 3px;
alignment: center;
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 {
scanning: scanning;
text: "Similar Images";
active-tab <=> root.active-tab;
curr_tab: CurrentTab.SimilarImages;
HorizontalLayout {
height: 20px;
alignment: end;
Image {
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 {SelectableTableView} from "selectable_tree_view.slint";
import {LeftSidePanel} from "left_side_panel.slint";
import {MainList} from "main_lists.slint";
import {CurrentTab} from "common.slint";
import { ActionButtons } from "action_buttons.slint";
export component MainWindow inherits Window {
callback deleted;
callback scanned(CurrentTab);
min-width: 300px;
preferred-width: 1024px;
min-height: 300px;
preferred-height: 600px;
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: 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: [];
@ -31,53 +52,30 @@ export component MainWindow inherits Window {
VerticalBox {
HorizontalBox {
vertical-stretch: 1.0;
// min-width: 600px;
preferred-height: 300px;
LeftSidePanel {
max-width: 10px; // Just forces the smallest possible
scanning: root.scanning;
horizontal-stretch: 0.0;
scanning <=> root.scanning;
active-tab <=> root.active-tab;
}
// 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", "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;
MainList {
horizontal-stretch: 1.0;
active-tab <=> root.active-tab;
empty_folder_model <=> root.empty_folder_model;
empty_files_model <=> root.empty_files_model;
similar_images_model <=> root.similar_images_model;
}
}
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();
}
}
ActionButtons {
vertical-stretch: 0.0;
scanning <=> root.scanning;
active-tab <=> root.active-tab;
deleted => {root.deleted();}
scanned(item) => {root.scanned(item);}
}
}
}

View file

@ -7,7 +7,7 @@ export component SelectableTableView inherits Rectangle {
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 <int> column_number: 4;
private property <int> column_number: column-sizes.length + 1;
in-out property <int> selected_item: -1;
@ -51,8 +51,10 @@ export component SelectableTableView inherits Rectangle {
}
list_view := ListView {
min-width: 100px;
for r[idx] in root.values : Rectangle {
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: 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 |
|---------|--------|--------------------------------------------------------------------------------------|
| 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 |
#### Debian / Ubuntu