panel: Reduce tool buttons gap from 8px to 4px. (#636)

<img width="314" alt="image"
src="https://github.com/user-attachments/assets/eab5f4f8-b604-4c5c-bfd4-2535340b1d1e"
/>

And use `selected` style for zoom button when zoomed:

<img width="114" alt="image"
src="https://github.com/user-attachments/assets/fa11ec81-a4db-42ea-8edc-39ed8ad40ba1"
/>
This commit is contained in:
Jason Lee 2025-02-17 14:46:44 +08:00 committed by GitHub
parent 4c554580c9
commit c62be93da6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
})),