Active
This commit is contained in:
parent
5f9ddc91e2
commit
7e7a603f4c
13 changed files with 152 additions and 64 deletions
2
.github/workflows/linux_cli.yml
vendored
2
.github/workflows/linux_cli.yml
vendored
|
@ -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:
|
||||||
|
|
4
.github/workflows/linux_gui.yml
vendored
4
.github/workflows/linux_gui.yml
vendored
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
BIN
czkawka_slint_gui/icons/logo.png
Normal file
BIN
czkawka_slint_gui/icons/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
czkawka_slint_gui/icons/settings.png
Normal file
BIN
czkawka_slint_gui/icons/settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
31
czkawka_slint_gui/ui/action_buttons.slint
Normal file
31
czkawka_slint_gui/ui/action_buttons.slint
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,10 +17,20 @@ 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;
|
||||||
|
Rectangle {
|
||||||
|
height: 100px;
|
||||||
|
Image {
|
||||||
|
width: root.width;
|
||||||
|
source: @image-url("../icons/logo.png");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
VerticalLayout {
|
||||||
spacing: 3px;
|
spacing: 3px;
|
||||||
|
alignment: center;
|
||||||
|
|
||||||
TabItem {
|
TabItem {
|
||||||
scanning: scanning;
|
scanning: scanning;
|
||||||
|
@ -41,4 +51,13 @@ export component LeftSidePanel {
|
||||||
curr_tab: CurrentTab.SimilarImages;
|
curr_tab: CurrentTab.SimilarImages;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
HorizontalLayout {
|
||||||
|
height: 20px;
|
||||||
|
alignment: end;
|
||||||
|
Image {
|
||||||
|
width: 20px;
|
||||||
|
source: @image-url("../icons/settings.png");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
38
czkawka_slint_gui/ui/main_lists.slint
Normal file
38
czkawka_slint_gui/ui/main_lists.slint
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 {
|
|
||||||
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);}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue