From c62be93da67ea163abc16807915c1c49cc3fd547 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Mon, 17 Feb 2025 14:46:44 +0800 Subject: [PATCH] panel: Reduce tool buttons gap from 8px to 4px. (#636) image And use `selected` style for zoom button when zoomed: image --- crates/ui/src/dock/tab_panel.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui/src/dock/tab_panel.rs b/crates/ui/src/dock/tab_panel.rs index 1967d5ce..e356848d 100644 --- a/crates/ui/src/dock/tab_panel.rs +++ b/crates/ui/src/dock/tab_panel.rs @@ -410,7 +410,7 @@ impl TabPanel { // TODO: Do not show MenuButton if there is no menu items h_flex() - .gap_2() + .gap_1() .occlude() .items_center() .when_some(self.toolbar_buttons(window, cx), |this, buttons| { @@ -432,6 +432,7 @@ impl TabPanel { .xsmall() .ghost() .tooltip(tooltip) + .when(zoomed, |this| this.selected(true)) .on_click(cx.listener(|view, _, window, cx| { view.on_action_toggle_zoom(&ToggleZoom, window, cx) })),