From 03151d86849a3bf6f02eb8304eb09f832d5190ef Mon Sep 17 00:00:00 2001 From: Trevor Brown Date: Sat, 31 Oct 2026 11:10:18 -0400 Subject: [PATCH] M7: a gap between Import and Export in the Local variables window (#1754) The window lays itself out with zero item spacing, and the header button bar is a child Ui that inherited it, so Import and Export touched. The bar now spaces its buttons 16 px apart, the gap Export has to the Close button glyph. Co-Authored-By: Claude Fable 5.1 --- crates/ui-egui/src/dialogs/variables_panel.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ui-egui/src/dialogs/variables_panel.rs b/crates/ui-egui/src/dialogs/variables_panel.rs index 9a1011a42..28d9a21e5 100644 --- a/crates/ui-egui/src/dialogs/variables_panel.rs +++ b/crates/ui-egui/src/dialogs/variables_panel.rs @@ -181,6 +181,9 @@ fn header(app: &mut FigApp, ui: &mut Ui, open: &mut bool) { // Import and export, left of Close. let bar = Rect::from_min_max(pos2(r.max.x - 280.0, r.min.y + 10.0), pos2(r.max.x - 40.0, r.max.y - 10.0)); let mut bar = ui.new_child(UiBuilder::new().max_rect(bar).layout(egui::Layout::right_to_left(egui::Align::Center))); + // The window lays itself out without item spacing (set by the caller); the buttons in this bar + // keep the same gap between them as the one between Export and the Close button (#1754). + bar.spacing_mut().item_spacing.x = 16.0; let export = widgets::button(&mut bar, tr("Export…"), false, true); crate::right::menu_popup(&export).show(|ui| { for (label, format) in [(tr("Variables JSON…"), "json"), (tr("CSS custom properties…"), "css"), (tr("Dart constants for Flutter…"), "dart")]