From aedab302b2848e44a1f4c3ac7263e8b8d49d7d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20G=C3=B6zeg=C3=BC?= Date: Fri, 23 Oct 2026 18:12:29 +0300 Subject: [PATCH] ui: larger Align icons and overflow button; Save for Web keeps its width on an invalid Matte - Move tool Align buttons: 16 px glyph in the 24 px box (was 12 px) - Document/panel overflow button: 16 px glyph in the normal text colour (was 12 px, dim) - Save for Web: a failed preview no longer draws its error beside the pane, which widened the dialog; the same message stays on the row above the panes --- crates/ui-egui/src/align_bar.rs | 2 +- crates/ui-egui/src/file_ui.rs | 7 +++---- crates/ui-egui/src/tab_strip.rs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/ui-egui/src/align_bar.rs b/crates/ui-egui/src/align_bar.rs index d663283e02..0a8ca4b3be 100644 --- a/crates/ui-egui/src/align_bar.rs +++ b/crates/ui-egui/src/align_bar.rs @@ -35,7 +35,7 @@ pub fn options(app: &mut PhotocraftApp, ui: &mut egui::Ui) { for (cmd, icon, label) in ALIGN { let tip = format!("{}: {}", tl!("Align"), tl!(label)); let on = app.session.is_enabled(cmd); - if ui.add_enabled_ui(on, |ui| icons::button(ui, icon, 24.0, false, &tip)).inner.clicked() { + if ui.add_enabled_ui(on, |ui| icons::button_with_icon_size(ui, icon, 24.0, 16.0, false, &tip)).inner.clicked() { let _ = app.run(cmd, json!({})); } } diff --git a/crates/ui-egui/src/file_ui.rs b/crates/ui-egui/src/file_ui.rs index e014ca9e36..6041f6a062 100644 --- a/crates/ui-egui/src/file_ui.rs +++ b/crates/ui-egui/src/file_ui.rs @@ -331,10 +331,9 @@ fn web_pane(app: &PhotocraftApp, ui: &mut egui::Ui, size: egui::Vec2, p: Option< None => (px.iter().flat_map(|q| q.map(|v| (v.clamp(0.0, 1.0) * 255.0).round() as u8)).collect::>(), None), Some(p) => match web_preview::optimized(ui, key, &format!("{}|{rev}|{frame:?}|{size_sig}", doc.id.0), p, &px, w, h) { Ok((preview, bytes, colors, ext)) => (preview, Some(((bytes as f64 * ratio) as usize, colors, ext))), - Err(error) => { - ui.label(error); - (vec![0; (w * h * 4) as usize], None) - } + // The error shows on the row above the panes; a label here sat beside the pane + // and widened the dialog (#8830). + Err(_) => (vec![0; (w * h * 4) as usize], None), }, }; let img = egui::ColorImage::from_rgba_unmultiplied([w as usize, h as usize], &rgba); diff --git a/crates/ui-egui/src/tab_strip.rs b/crates/ui-egui/src/tab_strip.rs index 1419471f1f..0a58cb6244 100644 --- a/crates/ui-egui/src/tab_strip.rs +++ b/crates/ui-egui/src/tab_strip.rs @@ -65,7 +65,7 @@ pub fn overflow_button(ui: &mut Ui, id: egui::Id, r: Rect, tip: &str, labels: &[ if resp.hovered() { paint_ui.painter().rect_filled(r.shrink2(vec2(1.0, 3.0)), t.radius_sm, t.hover.gamma_multiply(0.6)); } - crate::icons::paint(&paint_ui, r, "chevrons-right", 12.0, if resp.hovered() { t.text } else { t.text_dim }); + crate::icons::paint(&paint_ui, r, "chevrons-right", 16.0, t.text); resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, ui.is_enabled(), tip)); let resp = resp.on_hover_text(tip); egui::Popup::menu(&resp).show(|ui| {