From df4b510e93e18dc4d2f43cd21e444976294de28e Mon Sep 17 00:00:00 2001 From: bflatastic Date: Mon, 23 Nov 2026 16:10:11 +0700 Subject: [PATCH] The Control bar's Opacity group leaves before the other groups, so the narrower Style link and picker show without it as in production --- crates/ui-egui/src/chrome/control_bar.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/chrome/control_bar.rs b/crates/ui-egui/src/chrome/control_bar.rs index b0bf95f59f..affc548233 100644 --- a/crates/ui-egui/src/chrome/control_bar.rs +++ b/crates/ui-egui/src/chrome/control_bar.rs @@ -26,10 +26,13 @@ pub(crate) mod rank { /// The parts of a group that its other members work without: the width profile, Recolor Artwork, Global Edit /// Options, Document Setup, an image's Edit Original. pub const DETAIL: u8 = 3; + /// The Opacity link and field: they leave before the groups, so the narrower Style link and picker after them + /// can show without them. + pub const OPACITY: u8 = 4; /// Every other member of the bar. - pub const GROUP: u8 = 4; + pub const GROUP: u8 = 5; /// A section's link that stays after its fields leave. - pub const LINK: u8 = 6; + pub const LINK: u8 = 7; } /// An anchor button: icon, tooltip, command and the convert command's `to`. @@ -300,7 +303,7 @@ fn fill_and_stroke(app: &mut VectorcraftApp, ui: &mut Ui) { fn opacity_field(app: &mut VectorcraftApp, ui: &mut Ui, opacity: f32, selected: bool) { let label = tl!("Opacity:"); let (mut link, mut typed) = (false, None); - group(ui, rank::GROUP, |ui| { + group(ui, rank::OPACITY, |ui| { Field::new(label).side(SideLabel::new().link().scrub(true)).show(ui, |ui, _| { let number = NumberField::new(label, Bind::given(Some(f64::from(opacity) * 100.0))).range(0.0..=100.0).unit("%").scrub_by_label().show(ui);