From 0f871599285b1f2281ad3e3fc01483e407bf4692 Mon Sep 17 00:00:00 2001 From: Elias Date: Fri, 9 Oct 2026 18:04:31 +0100 Subject: [PATCH] ui: centre Reset / About... on the effect header row in Effect Controls The buttons were offset 2pt below the 22pt header's centre, so their text sat below the effect name's baseline. (cherry picked from commit acacef9f42e992c535397a55ae03bb3f3684a5e0) (cherry picked from commit dc9ff1b5aad75c4f4233d89ed33813844e980487) (cherry picked from commit 1e599b6e1d2e3402a10477ccccd1fd52724dc95c) --- crates/ui-egui/src/panels/effect_controls.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panels/effect_controls.rs b/crates/ui-egui/src/panels/effect_controls.rs index 501adf898..8f348098b 100644 --- a/crates/ui-egui/src/panels/effect_controls.rs +++ b/crates/ui-egui/src/panels/effect_controls.rs @@ -1122,7 +1122,7 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) { app.auto.add(&format!("effectControls.effect.{}.twirl", g.uid), tw, &g.name); let name = bp.text(pos2(tw.max.x + 6.0, r.center().y), Align2::LEFT_CENTER, &g.name, Tokens::semibold(12.0), t.text); app.auto.add(&format!("effectControls.effect.{}.name", g.uid), name, &g.name); - let reset = Rect::from_min_size(pos2(r.max.x - 96.0, r.min.y + 4.0), vec2(40.0, 18.0)); + let reset = Rect::from_min_size(pos2(r.max.x - 96.0, r.center().y - 9.0), vec2(40.0, 18.0)); let rresp = ui.interact(reset, egui::Id::new(("ec-reset", g.uid)), Sense::click()); bp.text(reset.center(), Align2::CENTER_CENTER, crate::i18n::tr("Reset"), Tokens::ui(11.5), if rresp.hovered() { t.hot_text } else { t.text_dim }); app.auto.add(&format!("effectControls.effect.{}.reset", g.uid), reset, "Reset"); @@ -1130,7 +1130,7 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) { actions.push(("effect.reset".into(), json!({"layer": layer.id.0, "effect": g.uid}))); } // About…: the effect's name and category (AE's About dialog). - let about = Rect::from_min_size(pos2(r.max.x - 50.0, r.min.y + 4.0), vec2(44.0, 18.0)); + let about = Rect::from_min_size(pos2(r.max.x - 50.0, r.center().y - 9.0), vec2(44.0, 18.0)); let aresp = ui.interact(about, egui::Id::new(("ec-about", g.uid)), Sense::click()); bp.text(about.center(), Align2::CENTER_CENTER, crate::i18n::tr("About..."), Tokens::ui(11.5), if aresp.hovered() { t.hot_text } else { t.text_dim }); app.auto.add(&format!("effectControls.effect.{}.about", g.uid), about, "About");