diff --git a/README.md b/README.md index 2d717028..70779658 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ UI components for building fantastic desktop applications using [GPUI](https://g Here is the first application: [Longbridge Pro](https://longbridge.com/desktop), built using GPUI Component. -Image +Image We built multi-theme support in the application. This feature is not included in GPUI Component itself, but is based on the `Theme` feature, so it's easy to implement. diff --git a/crates/ui/src/dock/tab_panel.rs b/crates/ui/src/dock/tab_panel.rs index 13769093..c06355f3 100644 --- a/crates/ui/src/dock/tab_panel.rs +++ b/crates/ui/src/dock/tab_panel.rs @@ -421,7 +421,6 @@ impl TabPanel { let view = cx.entity().clone(); let zoomable_toolbar_visible = state.zoomable.map_or(false, |v| v.toolbar_visible()); - // TODO: Do not show MenuButton if there is no menu items h_flex() .gap_1() .occlude() @@ -466,14 +465,16 @@ impl TabPanel { move |this, window, cx| { view.read(cx) .popup_menu(this, window, cx) - .when(zoomable, |this| { - let name = if zoomed { + .separator() + .menu_with_disabled( + if zoomed { t!("Dock.Zoom Out") } else { t!("Dock.Zoom In") - }; - this.separator().menu(name, Box::new(ToggleZoom)) - }) + }, + Box::new(ToggleZoom), + !zoomable, + ) .when(closable, |this| { this.separator() .menu(t!("Dock.Close"), Box::new(ClosePanel))