Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

Merge pull request #68 from storytold/fix/issue-20-resizable-panels

Brandon Thomas3165abf162f1
diff --cc crates/ui-egui/src/panels/left.rs
index 6a6d4d7e3,60ef60043..941e5070f
--- a/crates/ui-egui/src/panels/left.rs
+++ b/crates/ui-egui/src/panels/left.rs
@@@ -135,21 -132,22 +132,23 @@@ pub fn show(app: &mut LightcraftApp, ui
}
}
}
- keywords_section(app, ui);
- ui.add_space(10.0);
- if row(app, ui, "recentlyDeleted", Icon::Trash, "Recently Deleted", Some(deleted), src == LibrarySource::RecentlyDeleted, 0.0)
- .clicked()
- {
- let _ = app.run("library.source", json!({"kind": "recentlyDeleted"}));
- }
- });
+ }
+ keywords_section(app, ui);
+ ui.add_space(10.0);
+ if row(app, ui, "recentlyDeleted", Icon::Trash, "Recently Deleted", Some(deleted), src == LibrarySource::RecentlyDeleted, 0.0).clicked() {
+ let _ = app.run("library.source", json!({"kind": "recentlyDeleted"}));
+ }
});
+ });
+ if let Some(w) = resized {
+ app.ui.left_width = w;
+ }
}
-/// How many library photos have no file. Checking stats every file, which on a network share
-/// takes seconds, so it runs on a worker thread: the count shown is the last finished one,
-/// refreshed at most every 5 s (or when the catalog changed).
+/// How many library photos have no file (Local browse records are not checked; see
+/// `cmd::missing::checked_path`). Checking stats every file, which on a network share takes
+/// seconds, so it runs on a worker thread: the count shown is the last finished one, refreshed
+/// at most every 5 s, and at once (after the running check) when the catalog changed.
fn missing_count(app: &mut LightcraftApp, ui: &mut egui::Ui) -> usize {
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering::Relaxed};
#[derive(Clone, Default)]