Skip to content

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

refactor(ui-egui): replace wildcard imports with explicit lists

Dylan M. Taylor6774d1419f69
diff --git a/crates/engine/src/denoise/model.rs b/crates/engine/src/denoise/model.rs
index b9f75023e..c90641574 100644
--- a/crates/engine/src/denoise/model.rs
+++ b/crates/engine/src/denoise/model.rs
@@ -4,9 +4,9 @@ use super::gpu::{GPU_CRASHED, GPU_MAX_FALLBACKS, GPU_PARALLEL, GPU_SLOW, GPU_STU
use super::settings::{installed_models, read_settings};
#[cfg(feature = "denoise")]
use super::state::Pace;
-#[cfg(feature = "denoise")]
-use super::{AtomicBool, AtomicUsize, Ordering, OnceLock, PathBuf, PoisonError, RunError};
use super::{Arc, DenoiserManifest, Mutex, Path, TileRunner, Value, json};
+#[cfg(feature = "denoise")]
+use super::{AtomicBool, AtomicUsize, OnceLock, Ordering, PathBuf, PoisonError, RunError};
/// Stack of the threads that run the model (the runtime recurses through its graph).
pub(super) const STACK: usize = 16 << 20;
diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs
index 98f8458c9..fa10210f0 100644
--- a/crates/ui-egui/src/app.rs
+++ b/crates/ui-egui/src/app.rs
@@ -1,7 +1,13 @@
use super::clock::{AppClock, monotonic_ms};
use super::services::Services;
use super::state::{GestureFrame, InjectedDrop, InjectedPress};
-use super::*;
+use super::{
+ AiModel, Caches, CommandError, ControlRequest, ControlResponse, ErrorKind, GESTURE_TIMEOUT_MS, LightcraftApp, MAX_PENDING_GESTURES,
+ MAX_PENDING_SHOTS, MAX_SHOT_BYTES, MAX_SHOT_TOTAL_BYTES, MAX_TEXTURE_SIDE, PendingGesture, PendingShot, Perf, Receiver, SCREEN_PROFILE,
+ SCREENSHOT_FALLBACK_MS, SCREENSHOT_SETTLE_MS, SHOT_FORCE_BUSY_MS, SHOT_SETTLE_FRAMES, SHOT_SETTLE_MS, Sender, Session, ShotGeometry,
+ TOAST_SECONDS, UiState, Value, docking, drop_overlay, export_task, focus_scan, frame_rate, headless, i18n, import, lightroom_import, menus,
+ merge, model_setup, panels, pick, recheck, render, shortcuts, slideshow_export, state, sync, tasks, theme, updates_ui, widgets,
+};
mod control;
mod frame;
diff --git a/crates/ui-egui/src/app/control.rs b/crates/ui-egui/src/app/control.rs
index 00b66e4b0..525c5419c 100644
--- a/crates/ui-egui/src/app/control.rs
+++ b/crates/ui-egui/src/app/control.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{ControlResponse, GESTURE_TIMEOUT_MS, GestureFrame, LightcraftApp, MAX_PENDING_GESTURES, PendingGesture, Sender, Value};
use crate::control;
impl LightcraftApp {
diff --git a/crates/ui-egui/src/app/frame.rs b/crates/ui-egui/src/app/frame.rs
index efae98a9b..6e92091c7 100644
--- a/crates/ui-egui/src/app/frame.rs
+++ b/crates/ui-egui/src/app/frame.rs
@@ -1,4 +1,7 @@
-use super::*;
+use super::{
+ LightcraftApp, docking, drop_overlay, export_task, focus_scan, import, lightroom_import, merge, model_setup, monotonic_ms, panels, pick, recheck,
+ shortcuts, slideshow_export, state, sync, tasks, theme, updates_ui, widgets,
+};
impl LightcraftApp {
/// Install/refresh fonts once and watch the device and availability caches. Setup, not input.
diff --git a/crates/ui-egui/src/app/input.rs b/crates/ui-egui/src/app/input.rs
index f94108ce0..35b7991b4 100644
--- a/crates/ui-egui/src/app/input.rs
+++ b/crates/ui-egui/src/app/input.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{GESTURE_TIMEOUT_MS, InjectedDrop, InjectedPress, LightcraftApp, drop_overlay, import, panels};
impl LightcraftApp {
/// Preserve the currently queued handles while a prompt or blocking library window owns
@@ -262,7 +262,7 @@ mod drop_tests {
fn photo_sidecars_are_not_presets() {
let v = |a: &[&str]| a.iter().map(|s| s.to_string()).collect::<Vec<_>>();
let dropped = v(&["/a/IMG_1.CR2", "/a/IMG_1.xmp", "/a/IMG_2.jpg", "/a/IMG_2.jpg.XMP", "/a/Look.xmp", "/b/IMG_1.xmp"]);
- let (presets, photos) = super::split_presets(dropped);
+ let (presets, photos) = crate::split_presets(dropped);
assert_eq!(photos, v(&["/a/IMG_1.CR2", "/a/IMG_2.jpg"]));
assert_eq!(presets, v(&["/a/Look.xmp", "/b/IMG_1.xmp"]));
}
@@ -271,31 +271,31 @@ mod drop_tests {
fn detection_results_are_summarised_in_words() {
let r =
|counts: &[usize]| serde_json::json!({"photos": counts.iter().map(|n| serde_json::json!({"faces": vec![0; *n]})).collect::<Vec<_>>()});
- assert_eq!(super::detect_summary(&r(&[0])), "No faces found");
- assert_eq!(super::detect_summary(&r(&[1])), "Found 1 face");
- assert_eq!(super::detect_summary(&r(&[3])), "Found 3 faces");
- assert_eq!(super::detect_summary(&r(&[0, 0])), "No faces found in 2 photos");
- assert_eq!(super::detect_summary(&r(&[2, 0, 1])), "Found 3 faces in 2 photos");
- assert_eq!(super::detect_summary(&serde_json::json!({})), "No faces found in 0 photos");
+ assert_eq!(crate::app::detect_summary(&r(&[0])), "No faces found");
+ assert_eq!(crate::app::detect_summary(&r(&[1])), "Found 1 face");
+ assert_eq!(crate::app::detect_summary(&r(&[3])), "Found 3 faces");
+ assert_eq!(crate::app::detect_summary(&r(&[0, 0])), "No faces found in 2 photos");
+ assert_eq!(crate::app::detect_summary(&r(&[2, 0, 1])), "Found 3 faces in 2 photos");
+ assert_eq!(crate::app::detect_summary(&serde_json::json!({})), "No faces found in 0 photos");
}
#[test]
fn dropped_face_models_are_told_apart() {
for p in ["/a/model.onnx", "/a/dir/M.ONNX"] {
- assert!(super::is_model_file(p), "{p}");
+ assert!(crate::is_model_file(p), "{p}");
}
for p in ["/a/model.onnx.jpg", "/a/onnx", "/a/b.png"] {
- assert!(!super::is_model_file(p), "{p}");
+ assert!(!crate::is_model_file(p), "{p}");
}
}
#[test]
fn dropped_presets_are_told_apart_from_photos() {
for p in ["/a/Look.lrtemplate", "/a/b.XMP", "/a/pack.zip", "/a/x.lcpreset", "/a/Magic Hour.mplumpack", "/a/Pop.lmp", "/a/Bundle.LMP"] {
- assert!(super::is_preset_file(p), "{p}");
+ assert!(crate::is_preset_file(p), "{p}");
}
for p in ["/a/IMG_1.CR2", "/a/b.dng", "/a/c.jpg", "/a/folder"] {
- assert!(!super::is_preset_file(p), "{p}");
+ assert!(!crate::is_preset_file(p), "{p}");
}
}
}
diff --git a/crates/ui-egui/src/app/prefs.rs b/crates/ui-egui/src/app/prefs.rs
index a85a5f751..3dcafeb14 100644
--- a/crates/ui-egui/src/app/prefs.rs
+++ b/crates/ui-egui/src/app/prefs.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{LightcraftApp, SCREEN_PROFILE, theme};
impl LightcraftApp {
/// The system's appearance: the host's answer first, then egui's (none: unknown).
diff --git a/crates/ui-egui/src/app/screenshot.rs b/crates/ui-egui/src/app/screenshot.rs
index c2de3aae6..79b463995 100644
--- a/crates/ui-egui/src/app/screenshot.rs
+++ b/crates/ui-egui/src/app/screenshot.rs
@@ -1,4 +1,7 @@
-use super::*;
+use super::{
+ ControlResponse, LightcraftApp, MAX_PENDING_SHOTS, MAX_SHOT_BYTES, MAX_SHOT_TOTAL_BYTES, PendingShot, SCREENSHOT_FALLBACK_MS,
+ SCREENSHOT_SETTLE_MS, SHOT_FORCE_BUSY_MS, SHOT_SETTLE_FRAMES, SHOT_SETTLE_MS, Sender, ShotGeometry, headless,
+};
use crate::control;
impl LightcraftApp {
diff --git a/crates/ui-egui/src/caches.rs b/crates/ui-egui/src/caches.rs
index 0fb5a4b2c..93fe55184 100644
--- a/crates/ui-egui/src/caches.rs
+++ b/crates/ui-egui/src/caches.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Caches, album_picker, i18n, panels};
/// The left panel's counts.
#[derive(Clone, Copy, Debug, Default)]
diff --git a/crates/ui-egui/src/dialogs/confirm.rs b/crates/ui-egui/src/dialogs/confirm.rs
index 196018e55..6b8998c33 100644
--- a/crates/ui-egui/src/dialogs/confirm.rs
+++ b/crates/ui-egui/src/dialogs/confirm.rs
@@ -1,6 +1,6 @@
use super::cull::cull_params;
use super::export::export_dialog_params;
-use super::*;
+use super::{Dialog, LightcraftApp, json};
/// Runs a command that creates an album and asks the Albums tree to open the folders down to it.
fn created_in(app: &mut LightcraftApp, command: &str, params: serde_json::Value) -> Result<serde_json::Value, String> {
diff --git a/crates/ui-egui/src/dialogs/cull.rs b/crates/ui-egui/src/dialogs/cull.rs
index 2c3d6497a..a43276a64 100644
--- a/crates/ui-egui/src/dialogs/cull.rs
+++ b/crates/ui-egui/src/dialogs/cull.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::json;
/// Apply a dialog's action (also used by `ui.dialog.confirm`).
/// What [`fmt_gap`] writes, read back: `90`, `90 s`, `1 min 30 s`, `2 h 5 min`, `1 day`
diff --git a/crates/ui-egui/src/dialogs/export.rs b/crates/ui-egui/src/dialogs/export.rs
index 56292605c..ce9cffe77 100644
--- a/crates/ui-egui/src/dialogs/export.rs
+++ b/crates/ui-egui/src/dialogs/export.rs
@@ -1,5 +1,5 @@
use super::frame::{field, num};
-use super::*;
+use super::{ControlSpec, LightcraftApp, Section, SettingsGroup, Tokens, Track};
/// The Export dialog's watermark preview: the first exported photo, as wide as the dialog whatever
/// its shape, with the watermark drawn on it as the file will have it at size `resize` (`None` =
diff --git a/crates/ui-egui/src/dialogs/frame.rs b/crates/ui-egui/src/dialogs/frame.rs
index 3d8eb4ef8..007c733cb 100644
--- a/crates/ui-egui/src/dialogs/frame.rs
+++ b/crates/ui-egui/src/dialogs/frame.rs
@@ -1,5 +1,5 @@
use super::export::LABEL_W;
-use super::*;
+use super::{BACKDROP_SHOWN, ControlSpec, Dialog, LightcraftApp, Tokens};
/// A click on the dimmed backdrop around the dialog: it closes the dialog like Esc. Pressed and
/// released outside the window, so a slider dragged past its edge doesn't close it; a press while a
diff --git a/crates/ui-egui/src/dialogs/import/body.rs b/crates/ui-egui/src/dialogs/import/body.rs
index 9ba470660..8f82ae51d 100644
--- a/crates/ui-egui/src/dialogs/import/body.rs
+++ b/crates/ui-egui/src/dialogs/import/body.rs
@@ -1,5 +1,5 @@
use super::tags::{tag_field_width, tag_help, tag_toggle, unknown_tags_warning};
-use super::*;
+use super::{Align2, Color32, ImportDialog, LightcraftApp, Rect, Sense, Slot, Stroke, StrokeKind, Tokens, Vec2, pos2, register, vec2};
/// The review dialog's first size (points). It can be resized; the photo grid takes the height.
pub(crate) const DIALOG_SIZE: [f32; 2] = [960.0, 720.0];
diff --git a/crates/ui-egui/src/dialogs/import/scan.rs b/crates/ui-egui/src/dialogs/import/scan.rs
index a930af00c..67b1fa176 100644
--- a/crates/ui-egui/src/dialogs/import/scan.rs
+++ b/crates/ui-egui/src/dialogs/import/scan.rs
@@ -1,5 +1,5 @@
use super::task::ImportTask;
-use super::*;
+use super::{ImportDialog, LightcraftApp, Ordering, ScanInput, ScanOutput, ScanProgress, Value, json, scan_with};
/// A folder scan running on a worker thread (a network share can take minutes to read; the
/// window must keep answering meanwhile).
diff --git a/crates/ui-egui/src/dialogs/import/tags.rs b/crates/ui-egui/src/dialogs/import/tags.rs
index 770bb5b30..1ae10ca02 100644
--- a/crates/ui-egui/src/dialogs/import/tags.rs
+++ b/crates/ui-egui/src/dialogs/import/tags.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Tokens, register};
/// Reserve the actual translated tag button width beside a template field.
pub(crate) fn tag_field_width(ui: &egui::Ui) -> f32 {
diff --git a/crates/ui-egui/src/dialogs/import/task.rs b/crates/ui-egui/src/dialogs/import/task.rs
index bcef55b11..c41a941a3 100644
--- a/crates/ui-egui/src/dialogs/import/task.rs
+++ b/crates/ui-egui/src/dialogs/import/task.rs
@@ -1,5 +1,5 @@
use super::scan::{busy_synchronizing, running};
-use super::*;
+use super::{ImportDialog, ImportUprightMode, ImportWarning, ImportWarningCode, LightcraftApp, Ordering, Value, json};
/// Files per batch in the browser build (each batch joins the catalog as it is ready, so the
/// progress window updates); the desktop's worker uses [`lightcraft_engine::import::batch_size`].
diff --git a/crates/ui-egui/src/dialogs/rename.rs b/crates/ui-egui/src/dialogs/rename.rs
index f178ba6eb..8632daf41 100644
--- a/crates/ui-egui/src/dialogs/rename.rs
+++ b/crates/ui-egui/src/dialogs/rename.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::LightcraftApp;
/// Rows the Rename dialog previews.
pub(super) const RENAME_PREVIEW_ROWS: usize = 6;
diff --git a/crates/ui-egui/src/dialogs/sam_model.rs b/crates/ui-egui/src/dialogs/sam_model.rs
index fa578440b..fafa91ceb 100644
--- a/crates/ui-egui/src/dialogs/sam_model.rs
+++ b/crates/ui-egui/src/dialogs/sam_model.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{LightcraftApp, Tokens, json};
/// No SAM 3 model, no download running and nowhere to download it from: installing it by hand is
/// all the dialog can offer.
diff --git a/crates/ui-egui/src/dialogs/settings/appearance.rs b/crates/ui-egui/src/dialogs/settings/appearance.rs
index 51159df6b..571db16fc 100644
--- a/crates/ui-egui/src/dialogs/settings/appearance.rs
+++ b/crates/ui-egui/src/dialogs/settings/appearance.rs
@@ -1,5 +1,5 @@
use super::widgets::{choices, heading};
-use super::*;
+use super::{RichText, Tokens, register};
/// Appearance Mode (`button:settingsAppearance-{0,1,2}`: Auto, Dark, Light) above the light and
/// dark theme cards (`radio:theme-{id}`), each with a preview of the chosen theme. The card in
diff --git a/crates/ui-egui/src/dialogs/settings/display.rs b/crates/ui-egui/src/dialogs/settings/display.rs
index a54b05ced..a5b1974d2 100644
--- a/crates/ui-egui/src/dialogs/settings/display.rs
+++ b/crates/ui-egui/src/dialogs/settings/display.rs
@@ -1,6 +1,6 @@
use super::appearance::appearance;
use super::widgets::{check, choices, heading, hint, path_label, row};
-use super::*;
+use super::{GridBadges, LightcraftApp, RichText, Tokens, Value, json, register};
// ---------------------------------------------------------------------------------- Interface
diff --git a/crates/ui-egui/src/dialogs/settings/general.rs b/crates/ui-egui/src/dialogs/settings/general.rs
index 21b94f150..85866b5fa 100644
--- a/crates/ui-egui/src/dialogs/settings/general.rs
+++ b/crates/ui-egui/src/dialogs/settings/general.rs
@@ -1,5 +1,5 @@
use super::widgets::{check, choices, heading, hint, path_label, row};
-use super::*;
+use super::{LightcraftApp, RichText, StartupView, Tokens, json, register};
// ------------------------------------------------------------------------------------- General
diff --git a/crates/ui-egui/src/dialogs/settings/import.rs b/crates/ui-egui/src/dialogs/settings/import.rs
index c7272d366..97f34d6ab 100644
--- a/crates/ui-egui/src/dialogs/settings/import.rs
+++ b/crates/ui-egui/src/dialogs/settings/import.rs
@@ -1,6 +1,6 @@
use super::general::{cameras, preset_combo};
use super::widgets::{button_width, check, choices, heading, hint, path_label, row};
-use super::*;
+use super::{LightcraftApp, RichText, Tokens, json, register};
pub(super) fn import_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) {
let d = app.session.import_defaults.clone();
diff --git a/crates/ui-egui/src/dialogs/settings/libraries.rs b/crates/ui-egui/src/dialogs/settings/libraries.rs
index 389f79f11..8e41e8dd4 100644
--- a/crates/ui-egui/src/dialogs/settings/libraries.rs
+++ b/crates/ui-egui/src/dialogs/settings/libraries.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{LightcraftApp, Value, json};
// ------------------------------------------------------------------------------- Open Library…
diff --git a/crates/ui-egui/src/dialogs/settings/performance.rs b/crates/ui-egui/src/dialogs/settings/performance.rs
index daf2fa435..e65402c20 100644
--- a/crates/ui-egui/src/dialogs/settings/performance.rs
+++ b/crates/ui-egui/src/dialogs/settings/performance.rs
@@ -1,7 +1,7 @@
use super::widgets::{check, choices, heading, hint, row};
#[cfg(not(target_arch = "wasm32"))]
use super::widgets::{label_width, path_label};
-use super::*;
+use super::{CACHE_SIZES, LABEL_W, LightcraftApp, PREVIEW_LIMITS, RichText, Tokens, Value, json, register};
// --------------------------------------------------------------------------------- Performance
diff --git a/crates/ui-egui/src/dialogs/settings/slideshow.rs b/crates/ui-egui/src/dialogs/settings/slideshow.rs
index b67427c40..a11bbfff6 100644
--- a/crates/ui-egui/src/dialogs/settings/slideshow.rs
+++ b/crates/ui-egui/src/dialogs/settings/slideshow.rs
@@ -1,6 +1,6 @@
use super::display::duration_slider;
use super::widgets::{check, choices, heading, hint, row};
-use super::*;
+use super::{LightcraftApp, Tokens, Value, json, register};
/// The Slideshow tab: the slide preview, then the settings, in one column the width of the page
/// (the page scrolls; a column beside the preview would be wider than the window). Without
diff --git a/crates/ui-egui/src/dialogs/settings/widgets.rs b/crates/ui-egui/src/dialogs/settings/widgets.rs
index 3aea00b44..7607b1251 100644
--- a/crates/ui-egui/src/dialogs/settings/widgets.rs
+++ b/crates/ui-egui/src/dialogs/settings/widgets.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{LABEL_W, RichText, Tokens, register};
/// `path` shortened to fit `max` (as `width` measures it) by dropping leading folders, after
/// either kind of separator, so that its end stays (`…/Pictures/Library`,
diff --git a/crates/ui-egui/src/dialogs/slideshow_export.rs b/crates/ui-egui/src/dialogs/slideshow_export.rs
index 7a898b5db..0218d613e 100644
--- a/crates/ui-egui/src/dialogs/slideshow_export.rs
+++ b/crates/ui-egui/src/dialogs/slideshow_export.rs
@@ -5,8 +5,8 @@
use serde_json::{Value, json};
+use super::Tokens;
use super::frame::{choices, field};
-use super::*;
use crate::LightcraftApp;
use crate::pick::{PickKind, PickRequest, Picked};
diff --git a/crates/ui-egui/src/menus/files.rs b/crates/ui-egui/src/menus/files.rs
index 52389d930..d75282e57 100644
--- a/crates/ui-egui/src/menus/files.rs
+++ b/crates/ui-egui/src/menus/files.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Dialog, LightcraftApp, Value, json};
/// The Delete key in an album: a normal album loses the selected photos (`album.removePhotos`),
/// which stay in the library and their folder; a smart album keeps them (its rules decide) and
diff --git a/crates/ui-egui/src/menus/run.rs b/crates/ui-egui/src/menus/run.rs
index c550ff0d4..9977affac 100644
--- a/crates/ui-egui/src/menus/run.rs
+++ b/crates/ui-egui/src/menus/run.rs
@@ -1,6 +1,6 @@
use super::files::{edit_in, open_log_folder, open_original_in, show_in_finder, show_in_folders};
use super::ui_commands::{UI_COMMANDS, language_from_command};
-use super::*;
+use super::{BeforeAfter, Dialog, LightcraftApp, PickRequest, Picked, RightPanel, Value, ViewMode, Zoom, json, thumb_size_view};
fn panel(app: &mut LightcraftApp, ctx: &egui::Context, p: RightPanel, name: &str) {
if app.ui.right == p && crate::docking::exposed(app, crate::docking::Panel::Tools) {
diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs
index 7236b5528..2759d2197 100644
--- a/crates/ui-egui/src/menus/ui_commands.rs
+++ b/crates/ui-egui/src/menus/ui_commands.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::UiCommand;
/// The "Edit → Language" entries, one per language in [`crate::i18n::Locale::ALL`], so a language
/// has a matching menu command (also listed through the control channel). Tests check coverage.
diff --git a/crates/ui-egui/src/panels/detail/crop.rs b/crates/ui-egui/src/panels/detail/crop.rs
index 295b8f819..f88b23fdd 100644
--- a/crates/ui-egui/src/panels/detail/crop.rs
+++ b/crates/ui-egui/src/panels/detail/crop.rs
@@ -1,5 +1,7 @@
use super::geometry::CanvasMap;
-use super::*;
+use super::{
+ Affine, Color32, DevelopSettings, Frame, Gesture, LightcraftApp, PhotoId, Point, Pos2, Rect, Stroke, Tokens, json, pos2, register, vec2,
+};
// ------------------------------------------------------------------------ crop
diff --git a/crates/ui-egui/src/panels/detail/filmstrip.rs b/crates/ui-egui/src/panels/detail/filmstrip.rs
index c39fc4442..4a0de28cf 100644
--- a/crates/ui-egui/src/panels/detail/filmstrip.rs
+++ b/crates/ui-egui/src/panels/detail/filmstrip.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Align2, Color32, LightcraftApp, PhotoId, Pos2, Rect, Sense, Slot, Stroke, StrokeKind, Tokens, json, pos2, register, vec2};
/// Size of the Navigator mini map (points).
const NAV_W: f32 = 180.0;
diff --git a/crates/ui-egui/src/panels/detail/geometry.rs b/crates/ui-egui/src/panels/detail/geometry.rs
index 6424dabd8..d679010f1 100644
--- a/crates/ui-egui/src/panels/detail/geometry.rs
+++ b/crates/ui-egui/src/panels/detail/geometry.rs
@@ -1,6 +1,6 @@
#[cfg(test)]
use super::info::label_badge_rect;
-use super::*;
+use super::{Affine, Frame, LightcraftApp, PhotoId, Point, Pos2, Rect, Zoom, json, pos2, vec2};
/// Screen ↔ normalized-image mapping for the displayed frame.
#[derive(Clone, Copy)]
@@ -296,7 +296,7 @@ mod preview_geometry_tests {
fn before_label_badge_keeps_clear_of_the_filter_pill_and_the_right_edge() {
let text = vec2(40.0, 14.0);
let pane = Rect::from_min_size(pos2(100.0, 50.0), vec2(800.0, 600.0));
- let inset = super::FILTER_PILL_INSET + super::FILTER_PILL_HEIGHT;
+ let inset = crate::panels::detail::FILTER_PILL_INSET + crate::panels::detail::FILTER_PILL_HEIGHT;
let past = label_badge_rect(Rect::from_min_size(pos2(-900.0, -700.0), vec2(3000.0, 2000.0)), pane, text, inset);
assert_eq!(past.min, pos2(108.0, 50.0 + inset + 8.0));
let under = label_badge_rect(Rect::from_min_size(pos2(200.0, 60.0), vec2(400.0, 300.0)), pane, text, inset);
diff --git a/crates/ui-egui/src/panels/detail/info.rs b/crates/ui-egui/src/panels/detail/info.rs
index 520ad6213..da5ae1bed 100644
--- a/crates/ui-egui/src/panels/detail/info.rs
+++ b/crates/ui-egui/src/panels/detail/info.rs
@@ -1,5 +1,5 @@
use super::geometry::focus_box;
-use super::*;
+use super::{Color32, LightcraftApp, PhotoId, Pos2, Rect, Sense, Stroke, Tokens, json, pos2, register, register_geometry, vec2};
/// Draw the camera's focus box over a photo drawn in `img` (View ▸ Focus Point): green corner
/// brackets with a dark keyline, the way cameras show their AF frame, never smaller than 14 pt.
diff --git a/crates/ui-egui/src/panels/detail/masks.rs b/crates/ui-egui/src/panels/detail/masks.rs
index 073de8aa2..50424f6b3 100644
--- a/crates/ui-egui/src/panels/detail/masks.rs
+++ b/crates/ui-egui/src/panels/detail/masks.rs
@@ -1,5 +1,8 @@
use super::geometry::CanvasMap;
-use super::*;
+use super::{
+ Color32, DevelopSettings, Gesture, LightcraftApp, MaskShape, Point, Pos2, Rect, Sense, Stroke, StrokeKind, Tokens, ToolOverlay, json, pos2,
+ register, vec2,
+};
/// What the user did to a face box this frame.
pub(super) enum RegionEdit {
diff --git a/crates/ui-egui/src/panels/detail/retouch.rs b/crates/ui-egui/src/panels/detail/retouch.rs
index 64f4c2281..d74ead9ba 100644
--- a/crates/ui-egui/src/panels/detail/retouch.rs
+++ b/crates/ui-egui/src/panels/detail/retouch.rs
@@ -1,6 +1,6 @@
use super::geometry::CanvasMap;
use super::masks::{pin, pins_live};
-use super::*;
+use super::{Color32, DevelopSettings, Gesture, LightcraftApp, Point, Pos2, Rect, Stroke, ToolOverlay, json, register, vec2};
// ------------------------------------------------------------------------ remove
diff --git a/crates/ui-egui/src/panels/detail/window.rs b/crates/ui-egui/src/panels/detail/window.rs
index 0b441913b..f4ec89c5b 100644
--- a/crates/ui-egui/src/panels/detail/window.rs
+++ b/crates/ui-egui/src/panels/detail/window.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Color32, LightcraftApp, PhotoId, Rect, Slot, pos2, vec2};
/// Whether an overlay can be rendered on a region tile without changing what the tile means. Mask (one or all)
/// overlays are evaluated from the same mask alpha as the full render; Point Color range and Visualize
diff --git a/crates/ui-egui/src/panels/edit/curve.rs b/crates/ui-egui/src/panels/edit/curve.rs
index 856211e66..0eec3a5e4 100644
--- a/crates/ui-egui/src/panels/edit/curve.rs
+++ b/crates/ui-egui/src/panels/edit/curve.rs
@@ -1,6 +1,9 @@
use super::histogram::preview_histogram;
use super::sliders::control;
-use super::*;
+use super::{
+ Align2, Color32, DevelopSettings, Icon, LightcraftApp, Mesh, PARAM_AMOUNTS, ParametricCurve, PhotoId, Point, Pos2, Rect, RichText, Sense, Stroke,
+ Tokens, Vertex, controls, hex, json, paint, pos2, register, text_button, vec2,
+};
// ------------------------------------------------------------------------------ tone curve
diff --git a/crates/ui-egui/src/panels/edit/grading.rs b/crates/ui-egui/src/panels/edit/grading.rs
index a0b430acd..61f154300 100644
--- a/crates/ui-egui/src/panels/edit/grading.rs
+++ b/crates/ui-egui/src/panels/edit/grading.rs
@@ -1,5 +1,8 @@
use super::sliders::control;
-use super::*;
+use super::{
+ Align2, Color32, DevelopSettings, Icon, LightcraftApp, Mesh, PhotoId, Pos2, Rect, Sense, Stroke, Tokens, Vertex, json, paint, pos2, register,
+ vec2,
+};
// ------------------------------------------------------------------------------ colour grading
diff --git a/crates/ui-egui/src/panels/edit/histogram.rs b/crates/ui-egui/src/panels/edit/histogram.rs
index 44d791c4a..085fbda5d 100644
--- a/crates/ui-egui/src/panels/edit/histogram.rs
+++ b/crates/ui-egui/src/panels/edit/histogram.rs
@@ -1,6 +1,9 @@
#[cfg(test)]
use super::sliders::reset_tip;
-use super::*;
+use super::{
+ Align2, Color32, Histogram, Icon, LightcraftApp, Mesh, PhotoId, Pos2, Rect, RichText, RightPanel, Sense, Slot, Stroke, Tokens, Vertex, divider,
+ hex, json, paint, pos2, register, vec2,
+};
// ------------------------------------------------------------------------------ histogram
diff --git a/crates/ui-egui/src/panels/edit/mixer.rs b/crates/ui-egui/src/panels/edit/mixer.rs
index b869b32dd..0bddba375 100644
--- a/crates/ui-egui/src/panels/edit/mixer.rs
+++ b/crates/ui-egui/src/panels/edit/mixer.rs
@@ -1,6 +1,6 @@
use super::curve::set_tat;
use super::sliders::{control, sub_title};
-use super::*;
+use super::{BAND_COLORS, Color32, DevelopSettings, Icon, LightcraftApp, Sense, Stroke, Tokens, hex, json, paint, register, text_button, vec2};
// ------------------------------------------------------------------------------ colour mixer
diff --git a/crates/ui-egui/src/panels/edit/sliders.rs b/crates/ui-egui/src/panels/edit/sliders.rs
index aad9cdf6a..00adb9928 100644
--- a/crates/ui-egui/src/panels/edit/sliders.rs
+++ b/crates/ui-egui/src/panels/edit/sliders.rs
@@ -1,4 +1,7 @@
-use super::*;
+use super::{
+ Align2, ControlSpec, DevelopSettings, Icon, LightcraftApp, PhotoId, Section, Sense, SliderOut, Tokens, Track, Value, controls, divider, json,
+ pos2, register, section_header, slider, vec2,
+};
/// Commit a slider interaction: begin → live updates → end, so a drag is one undo step.
pub fn apply_slider_out(
diff --git a/crates/ui-egui/src/panels/left/albums.rs b/crates/ui-egui/src/panels/left/albums.rs
index e0204c826..bfcc6a219 100644
--- a/crates/ui-egui/src/panels/left/albums.rs
+++ b/crates/ui-egui/src/panels/left/albums.rs
@@ -1,6 +1,6 @@
use super::folders::{folder_menu, is_within};
use super::rows::{INDENT_STEP, indent_x, row_sensed, set_tree_open, tree_open, tree_toggle};
-use super::*;
+use super::{Album, AlbumId, Align2, Icon, LibrarySource, LightcraftApp, Rect, Sense, Tokens, json, pos2, register, vec2};
/// Albums: the tree of albums and the folders they are sorted into. `reveal`: an album just made,
/// whose folders open down to it.
diff --git a/crates/ui-egui/src/panels/left/dates.rs b/crates/ui-egui/src/panels/left/dates.rs
index 49d8cf898..9b822c6e5 100644
--- a/crates/ui-egui/src/panels/left/dates.rs
+++ b/crates/ui-egui/src/panels/left/dates.rs
@@ -1,5 +1,5 @@
use super::rows::{INDENT_STEP, row, tree_open, tree_toggle};
-use super::*;
+use super::{Icon, LibrarySource, LightcraftApp, json};
/// By Date: year → month → day; a click filters by that prefix, the triangle opens a level.
pub(super) fn date_rows(app: &mut LightcraftApp, ui: &mut egui::Ui) {
diff --git a/crates/ui-egui/src/panels/left/folders.rs b/crates/ui-egui/src/panels/left/folders.rs
index 95915b740..1ded12f07 100644
--- a/crates/ui-egui/src/panels/left/folders.rs
+++ b/crates/ui-egui/src/panels/left/folders.rs
@@ -1,7 +1,7 @@
use super::albums::pointer_over_row;
use super::local::{same_folder, subfolders};
use super::rows::{INDENT_STEP, LIBFOLDER_REVEALED, out_of_sight, row, row_sensed, set_tree_open, tree_open, tree_toggle};
-use super::*;
+use super::{Album, FolderNode, Icon, LibrarySource, LightcraftApp, Sense, Tokens, json, register, vec2};
/// A folder on disk with a disclosure triangle: click browses it, the triangle lists its
/// subfolders. In the tree that holds the folder being browsed (`reveal`), the folders on the
diff --git a/crates/ui-egui/src/panels/left/keywords.rs b/crates/ui-egui/src/panels/left/keywords.rs
index 81997f2e2..4342efcc6 100644
--- a/crates/ui-egui/src/panels/left/keywords.rs
+++ b/crates/ui-egui/src/panels/left/keywords.rs
@@ -1,6 +1,6 @@
use super::dates::browse_all_photos;
use super::rows::{INDENT_STEP, out_of_sight, row, tree_open, tree_toggle};
-use super::*;
+use super::{Icon, KeywordNode, LightcraftApp, json};
/// "Keywords": the library's keyword tree with photo counts (`a|b|c` keywords nest). A click
/// filters the grid by the keyword (children included), the triangle opens a level, and the
diff --git a/crates/ui-egui/src/panels/left/local.rs b/crates/ui-egui/src/panels/left/local.rs
index e1a62d8ea..6d3549570 100644
--- a/crates/ui-egui/src/panels/left/local.rs
+++ b/crates/ui-egui/src/panels/left/local.rs
@@ -1,6 +1,6 @@
use super::folders::folder_tree;
use super::rows::row;
-use super::*;
+use super::{Icon, LibrarySource, LightcraftApp, SidebarSection, json, register};
/// Local's folders as they stand this frame, and the folder being browsed among them.
pub(super) struct LocalNow {
diff --git a/crates/ui-egui/src/panels/left/rows.rs b/crates/ui-egui/src/panels/left/rows.rs
index 541d98b06..edfdff167 100644
--- a/crates/ui-egui/src/panels/left/rows.rs
+++ b/crates/ui-egui/src/panels/left/rows.rs
@@ -1,5 +1,5 @@
use super::albums::MARK_W;
-use super::*;
+use super::{Align2, Icon, LightcraftApp, Rect, Sense, Tokens, paint, pos2, register, vec2};
/// How wide the sidebar's content needs to be, from the widest row of the last frame: rows are
/// drawn at this width (or the panel's, if wider), and the sidebar scrolls sideways when it
diff --git a/crates/ui-egui/src/panels/left/sections.rs b/crates/ui-egui/src/panels/left/sections.rs
index 42cc631b5..5597904a8 100644
--- a/crates/ui-egui/src/panels/left/sections.rs
+++ b/crates/ui-egui/src/panels/left/sections.rs
@@ -1,6 +1,6 @@
use super::albums::top_level_drop_target;
use super::rows::{ROW_HEIGHT, note_width};
-use super::*;
+use super::{Align2, Icon, LightcraftApp, Rect, Sense, SidebarSection, Tokens, icon_button, json, paint, pos2, register, vec2};
/// Space above a section's header.
pub(super) const SECTION_GAP: f32 = 10.0;
diff --git a/crates/ui-egui/src/panels/right/crop.rs b/crates/ui-egui/src/panels/right/crop.rs
index 67efd91f6..0b71fffe8 100644
--- a/crates/ui-egui/src/panels/right/crop.rs
+++ b/crates/ui-egui/src/panels/right/crop.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{LightcraftApp, PhotoId, Tokens, divider, header, json, padded, register, slider, text_button};
/// The aspect presets of the Crop panel: (menu label, `crop.aspect` value).
const ASPECT_PRESETS: [(&str, &str); 10] = [
diff --git a/crates/ui-egui/src/panels/right/history.rs b/crates/ui-egui/src/panels/right/history.rs
index 49229783b..d434075ad 100644
--- a/crates/ui-egui/src/panels/right/history.rs
+++ b/crates/ui-egui/src/panels/right/history.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Align2, Icon, LightcraftApp, PhotoId, Rect, Sense, Tokens, header, json, padded, paint, pos2, register, text_button, vec2};
pub(super) fn versions(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {
let Some(p) = app.session.catalog.photo(id).cloned() else { return };
diff --git a/crates/ui-egui/src/panels/right/info.rs b/crates/ui-egui/src/panels/right/info.rs
index 4d7c198a0..5810a0f27 100644
--- a/crates/ui-egui/src/panels/right/info.rs
+++ b/crates/ui-egui/src/panels/right/info.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Icon, LightcraftApp, PhotoId, Sense, Tokens, divider, header, json, padded, register, text_button, vec2};
pub(super) fn info(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {
let Some(p) = app.session.catalog.photo(id).cloned() else { return };
diff --git a/crates/ui-egui/src/panels/right/keywords.rs b/crates/ui-egui/src/panels/right/keywords.rs
index 6d7d5868b..b6598476a 100644
--- a/crates/ui-egui/src/panels/right/keywords.rs
+++ b/crates/ui-egui/src/panels/right/keywords.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{HOLD, LightcraftApp, PhotoId, Rect, Tokens, fold_header, json, padded, register, text_button, vec2};
pub(super) fn keywords(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {
// (the box is the selection's: the active photo only says that there is one)
diff --git a/crates/ui-egui/src/services.rs b/crates/ui-egui/src/services.rs
index 8eb13aa85..cc0802248 100644
--- a/crates/ui-egui/src/services.rs
+++ b/crates/ui-egui/src/services.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Session, Value, pick};
pub type PickFiles = Box<dyn FnMut() -> Vec<String>>;
diff --git a/crates/ui-egui/src/state/dialog.rs b/crates/ui-egui/src/state/dialog.rs
index edc4946cd..7f9226b6e 100644
--- a/crates/ui-egui/src/state/dialog.rs
+++ b/crates/ui-egui/src/state/dialog.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Deserialize, Serialize};
/// Settings group ids (`SettingsGroup` serde names) a new preset includes by default: everything
/// but crop, masks, spots and red eye.
diff --git a/crates/ui-egui/src/state/settings.rs b/crates/ui-egui/src/state/settings.rs
index 2d748f5a7..fff943b4c 100644
--- a/crates/ui-egui/src/state/settings.rs
+++ b/crates/ui-egui/src/state/settings.rs
@@ -1,7 +1,7 @@
use super::view::LoupeInfo;
#[cfg(test)]
use super::view::{InfoOverlay, LoupeInfoField};
-use super::*;
+use super::{Deserialize, Serialize};
/// Which view the app opens in.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
diff --git a/crates/ui-egui/src/state/view.rs b/crates/ui-egui/src/state/view.rs
index 1bbfd4349..611002647 100644
--- a/crates/ui-egui/src/state/view.rs
+++ b/crates/ui-egui/src/state/view.rs
@@ -1,4 +1,4 @@
-use super::*;
+use super::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]