Skip to content

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

Merge PR #1215 (rebased)

Brandon Thomasb3012745d504
diff --cc crates/ui-egui/src/panels/dialogs.rs
index 01a5e762b,42dbde875..ee6b91df8
--- a/crates/ui-egui/src/panels/dialogs.rs
+++ b/crates/ui-egui/src/panels/dialogs.rs
@@@ -1298,15 -1295,10 +1303,16 @@@ pub fn show(app: &mut LightcraftApp, ct
}
}
Dialog::Shortcuts => crate::panels::keymap::body(app, ui, &t),
+ Dialog::Print => crate::print_view::body(app, ui, &t),
});
ui.add_space(4.0);
- ui.horizontal(|ui| {
+ // the confirm on the right with Cancel to its left (macOS and GNOME's order), filled with
+ // the accent when it is the dialog's primary action. The row spans the width the window
+ // gives its content this frame (its default width, or its content's if wider), so it
+ // reaches the edge without widening the window.
+ let row_w = ui.available_width().max(ui.min_rect().width()).max(1.0);
+ let row_h = ui.spacing().interact_size.y;
+ ui.allocate_ui_with_layout(egui::vec2(row_w, row_h), egui::Layout::left_to_right(egui::Align::Center), |ui| {
// a model file LightCraft cannot use has nothing to confirm, nor has a dialog that
// only shows something (one Close, no Cancel / OK)
let unusable_model = matches!(&dlg, Dialog::DenoiseModel { info, .. } | Dialog::FaceModel { info, .. } if info["kind"] == "unsupported");