From 1bd46c520d103225ebde666a3669b417d7e13498 Mon Sep 17 00:00:00 2001 From: David Mann Date: Mon, 30 Nov 2026 19:48:10 +0100 Subject: [PATCH] ui-egui: give dialogs a roomier margin (#18416) PhotoCraft left the shared space.pad.dialog token at its default (12 px Comfortable, 8 px Compact), so title, message and buttons sat right at the dialog's edge. Set it to 24 and 16 px in the app's size overrides; only dialogs read this token. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/app/framework.rs | 3 ++- crates/ui-egui/src/app/sizes.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/app/framework.rs b/crates/ui-egui/src/app/framework.rs index 9c58f81255..65b2763f99 100644 --- a/crates/ui-egui/src/app/framework.rs +++ b/crates/ui-egui/src/app/framework.rs @@ -271,7 +271,8 @@ fn defaults() -> AppDefaults { } } -/// PhotoCraft's size overrides: Photoshop's panel dock width, and 12-point Label and Mono text in the compact density. +/// PhotoCraft's size overrides: Photoshop's panel dock width, a roomier dialog margin (twice the panel padding, so +/// short questions such as "Unsaved changes" do not look cramped), and 12-point Label and Mono text in the compact density. const SIZES: &[u8] = include_bytes!("sizes.json"); /// The size overrides, parsed once: the root keeps one `Arc` so the runtime's token and hit-size caches, which key on diff --git a/crates/ui-egui/src/app/sizes.json b/crates/ui-egui/src/app/sizes.json index 5727ea93d8..afa5f5a7fa 100644 --- a/crates/ui-egui/src/app/sizes.json +++ b/crates/ui-egui/src/app/sizes.json @@ -1 +1 @@ -{ "all": { "size.dock.column": 290 }, "compact": { "typography.label.size": 12, "typography.mono.size": 12 } } +{ "all": { "size.dock.column": 290 }, "compact": { "space.pad.dialog": 16, "typography.label.size": 12, "typography.mono.size": 12 }, "comfortable": { "space.pad.dialog": 24 } }