Skip to content

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

refactor(lightcraft-ui-egui): move panels/dialogs.rs to dialogs.rs

aionggee590a5b9b0a
diff --git a/crates/ui-egui/src/panels/dialogs.rs b/crates/ui-egui/src/dialogs.rs
similarity index 99%
rename from crates/ui-egui/src/panels/dialogs.rs
rename to crates/ui-egui/src/dialogs.rs
index f26b43325..cae0dcee7 100644
--- a/crates/ui-egui/src/panels/dialogs.rs
+++ b/crates/ui-egui/src/dialogs.rs
@@ -176,7 +176,7 @@ fn watermark_preview(
pub const ABOUT_TABS: &[(&str, &str)] = &[("about", "About"), ("contributors", "Contributors"), ("models", "Models")];
/// Help ▸ What's New (docs/whats-new.md).
-pub const WHATS_NEW: &str = include_str!("../../../../docs/whats-new.md");
+pub const WHATS_NEW: &str = include_str!("../../../docs/whats-new.md");
/// The import review and Settings keep window ids of their own, so the size each is given
/// doesn't carry over to the other dialogs.
diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs
index 2dcc84189..dbbd5e0ed 100644
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@ -14,6 +14,7 @@ mod command_error;
pub mod control;
pub mod credits;
pub mod date_picker;
+pub mod dialogs;
pub mod docking;
mod drop_overlay;
pub mod export_task;
diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rs
index e3300e04f..fcb36f344 100644
--- a/crates/ui-egui/src/panels.rs
+++ b/crates/ui-egui/src/panels.rs
@@ -7,7 +7,6 @@ pub mod compare;
pub mod crop_overlay;
pub mod denoise;
pub mod detail;
-pub mod dialogs;
pub mod edit;
pub mod empty_library;
pub mod faces;
@@ -44,6 +43,7 @@ pub mod unnamed;
use egui::{Align2, Rect, pos2, vec2};
use crate::LightcraftApp;
+pub use crate::dialogs;
use crate::theme::Tokens;
/// Show a side panel the user resizes by dragging its inner edge. `width` (in [`crate::UiState`],
diff --git a/crates/ui-egui/src/panels/settings.rs b/crates/ui-egui/src/panels/settings.rs
index 338d55c00..f68da16f1 100644
--- a/crates/ui-egui/src/panels/settings.rs
+++ b/crates/ui-egui/src/panels/settings.rs
@@ -876,7 +876,7 @@ fn interface_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) {
/// which, the three lines each of Info 1 and Info 2 shows, which of them shows briefly when the
/// photo changes, and whether the loupe shows its loading and rendering message
/// (`view.viewOptions`). Changes apply as they are made.
-pub(super) fn view_options(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) {
+pub(crate) fn view_options(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) {
use crate::state::{InfoOverlay as I, LoupeInfo, LoupeInfoField as F};
heading(ui, t, crate::i18n::tr("Loupe View"));
let mut show = app.ui.info_overlay != I::Off;