Skip to content

Commit 6678538

Browse files
committed
DD
1 parent e0a40ba commit 6678538

File tree

9 files changed

+78
-32
lines changed

9 files changed

+78
-32
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,4 @@ The Czkawka GTK GUI and CLI applications are licensed under the [MIT](https://mi
134134

135135
If you are using the app, I would appreciate a donation for its further development, which can be
136136
done [here](https://github.com/sponsors/qarmin).
137+

czkawka_core/src/tools/similar_videos/core.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,12 @@ impl SimilarVideos {
134134
return None;
135135
}
136136

137-
let size = file_entry.size;
137+
// Currently size is not too much relevant
138+
// let size = file_entry.size;
138139
let res = self.check_video_file_entry(file_entry);
139140

140141
progress_handler.increase_items(1);
141-
progress_handler.increase_size(size);
142+
// progress_handler.increase_size(size);
142143

143144
Some(res)
144145
})

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ bloat:
127127
check_compilations:
128128
git checkout Cargo.toml
129129
# cargo install --path misc/test_compilation_speed_size
130-
#test_compilation_speed_size misc/test_compilation_speed_size/krokiet.json
130+
test_compilation_speed_size misc/test_compilation_speed_size/test.json
131131
python3 misc/test_compilation_speed_size/generate_md_and_plots.py
132132

133133
tags:

krokiet/ui/color_palette.slint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export global ColorPalette {
2121

2222
in-out property <color> line_item_color: Settings.dark_theme ? #222222 : #dddddd;
2323

24+
in-out property <color> remove_item_color_button: Settings.dark_theme ? #222222 : #dddddd;
25+
2426
public pure function get_listview_color(selected: bool, hovered: bool) -> color {
2527
if (selected) {
2628
return hovered ? self.list_view_item_selected_hovered_color : self.list_view_item_selected_color;

krokiet/ui/included_directories.slint

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export component IncludedDirectories {
6464

6565
HorizontalLayout {
6666
padding-left: 7.5px;
67-
spacing: 5px;
67+
spacing: 0px;
6868
width: parent.width;
6969

7070
CheckBox {
@@ -75,20 +75,26 @@ export component IncludedDirectories {
7575
width: size_referenced_folder;
7676
}
7777

78-
79-
HorizontalLayout {
78+
Text {
79+
horizontal-stretch: 1.0;
80+
height: parent.height;
81+
text: r.path;
82+
vertical-alignment: center;
83+
horizontal-alignment: left;
84+
85+
}
86+
}
87+
88+
HorizontalLayout {
89+
width: parent.width;
90+
padding-left: 5px;
91+
Rectangle { }
92+
Rectangle {
93+
width: 50px;
94+
background: ColorPalette.remove_item_color_button;
8095
horizontal-stretch: 1.0;
81-
padding-left: 5px;
82-
Text {
83-
horizontal-stretch: 1.0;
84-
height: parent.height;
85-
text: r.path;
86-
vertical-alignment: center;
87-
}
88-
8996
Button {
9097
width: 50px;
91-
horizontal-stretch: 1.0;
9298
icon: @image-url("../icons/krokiet_delete.svg");
9399
colorize-icon: true;
94100
clicked => {
@@ -153,23 +159,30 @@ export component ExcludedDirectories {
153159
}
154160
}
155161

162+
Text {
163+
width: parent.width;
164+
horizontal-stretch: 1.0;
165+
height: parent.height;
166+
text: r.path;
167+
vertical-alignment: center;
168+
horizontal-alignment: left;
169+
x: 5px;
170+
}
171+
156172
HorizontalLayout {
157173
width: parent.width;
158-
padding-left: 5px;
159-
Text {
160-
horizontal-stretch: 1.0;
161-
height: parent.height;
162-
text: r.path;
163-
vertical-alignment: center;
164-
}
165-
166-
Button {
174+
Rectangle { }
175+
Rectangle {
167176
width: 50px;
177+
background: ColorPalette.remove_item_color_button;
168178
horizontal-stretch: 1.0;
169-
icon: @image-url("../icons/krokiet_delete.svg");
170-
colorize-icon: true;
171-
clicked => {
172-
Callabler.remove_item_directories(false, idx);
179+
Button {
180+
width: 50px;
181+
icon: @image-url("../icons/krokiet_delete.svg");
182+
colorize-icon: true;
183+
clicked => {
184+
Callabler.remove_item_directories(false, idx);
185+
}
173186
}
174187
}
175188
}

krokiet/ui/settings.slint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export global Settings {
88
in-out property <int> language_index: 0;
99
in-out property <string> language_value: "English";
1010

11-
in-out property <[IncludedDirectoriesModel]> included_directories_model: [{ path: "/home/path", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false }];
11+
in-out property <[IncludedDirectoriesModel]> included_directories_model: [{ path: "/home/pathssssssssssssssssssssss", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false }];
1212
in-out property <int> included_directories_model_selected_idx: -1;
13-
in-out property <[ExcludedDirectoriesModel]> excluded_directories_model: [{ path:"/home/path", selected_row: false },{ path:"/home/path", selected_row: false },{ path:"/home/path", selected_row: false },{ path:"/home/path", selected_row: false }, { path:"/home/a", selected_row: false }];
13+
in-out property <[ExcludedDirectoriesModel]> excluded_directories_model: [{ path:"/home/pathssssssssssssssssssssssss", selected_row: false },{ path:"/home/path", selected_row: false },{ path:"/home/path", selected_row: false },{ path:"/home/path", selected_row: false }, { path:"/home/a", selected_row: false }];
1414
in-out property <int> excluded_directories_model_selected_idx: -1;
1515

1616
// Settings

misc/test_compilation_speed_size/krokiet.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"cranelift": "Both"
1010
},
1111
"build_config": [
12+
{
13+
"name": "debug",
14+
"rust_base_config": "Debug"
15+
},
1216
{
1317
"name": "debug + debug disabled",
1418
"rust_base_config": "Debug",
@@ -19,6 +23,10 @@
1923
"rust_base_config": "Debug",
2024
"build_or_check": "Check"
2125
},
26+
{
27+
"name": "release",
28+
"rust_base_config": "Release"
29+
},
2230
{
2331
"name": "release + debug info",
2432
"rust_base_config": "Release",
@@ -71,6 +79,14 @@
7179
"codegen_units": "One",
7280
"panic": "Abort"
7381
},
82+
{
83+
"name": "release + fat lto + cu 1 + panic abort + native",
84+
"rust_base_config": "Release",
85+
"lto": "Fat",
86+
"codegen_units": "One",
87+
"panic": "Abort",
88+
"native": true
89+
},
7490
{
7591
"name": "release + fat lto + cu 1 + panic abort + build-std",
7692
"rust_base_config": "Release",

misc/test_compilation_speed_size/src/main.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ fn run_cargo_build(mold: bool, cranelift: bool, build_config: &BuildConfig, proj
104104
}
105105
let mut rust_flags = None;
106106
if mold {
107+
let to_add = "-C link-arg=-fuse-ld=mold";
107108
rust_flags = match rust_flags {
108-
None => Some("-C link-arg=-fuse-ld=mold".to_string()),
109-
Some(flags) => Some(format!("{} -C link-arg=-fuse-ld=mold", flags)),
109+
None => Some(to_add.to_string()),
110+
Some(flags) => Some(format!("{flags} {to_add}")),
110111
};
111112
}
112113
if build_config.build_std {
@@ -116,6 +117,13 @@ fn run_cargo_build(mold: bool, cranelift: bool, build_config: &BuildConfig, proj
116117
command.args(["-Z", "build-std=std"]);
117118
}
118119
}
120+
if build_config.native {
121+
let to_add = "-C target-cpu=native";
122+
rust_flags = match rust_flags {
123+
None => Some(to_add.to_string()),
124+
Some(flags) => Some(format!("{flags} {to_add}")),
125+
};
126+
}
119127

120128
if let Some(rust_flags) = rust_flags {
121129
command.env("RUSTFLAGS", rust_flags);

misc/test_compilation_speed_size/src/model.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pub struct BuildConfigRead {
4040
pub overflow_checks: Option<OverflowChecks>,
4141
pub incremental: Option<Incremental>,
4242
pub build_std: Option<bool>,
43+
pub native: Option<bool>,
4344
}
4445

4546
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
@@ -56,6 +57,7 @@ pub struct BuildConfig {
5657
pub overflow_checks: OverflowChecks,
5758
pub incremental: Incremental,
5859
pub build_std: bool,
60+
pub native: bool,
5961
}
6062

6163
impl From<BuildConfigRead> for BuildConfig {
@@ -74,6 +76,7 @@ impl From<BuildConfigRead> for BuildConfig {
7476
overflow_checks: OverflowChecks::Off,
7577
incremental: Incremental::Off,
7678
build_std: false,
79+
native: false,
7780
},
7881
RustBaseConfig::Debug => BuildConfig {
7982
name: "debug".to_string(),
@@ -88,6 +91,7 @@ impl From<BuildConfigRead> for BuildConfig {
8891
overflow_checks: OverflowChecks::On,
8992
incremental: Incremental::On,
9093
build_std: false,
94+
native: false,
9195
}
9296
};
9397

@@ -104,6 +108,7 @@ impl From<BuildConfigRead> for BuildConfig {
104108
overflow_checks: config.overflow_checks.unwrap_or(base_config.overflow_checks),
105109
incremental: config.incremental.unwrap_or(base_config.incremental),
106110
build_std: config.build_std.unwrap_or(false),
111+
native: config.native.unwrap_or(false),
107112
}
108113
}
109114
}

0 commit comments

Comments
 (0)