This commit is contained in:
parent
3a6741f990
commit
cf24614bd2
1 changed files with 4 additions and 0 deletions
|
|
@ -245,6 +245,7 @@ impl ParentElement for TitleBar {
|
|||
impl RenderOnce for TitleBar {
|
||||
fn render(mut self, window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||
let is_linux = cfg!(target_os = "linux");
|
||||
let is_macos = cfg!(target_os = "macos");
|
||||
|
||||
let paddings = self.base.style().padding.clone();
|
||||
self.base.style().padding.left = None;
|
||||
|
|
@ -263,6 +264,9 @@ impl RenderOnce for TitleBar {
|
|||
.when(is_linux, |this| {
|
||||
this.on_double_click(|_, window, _| window.zoom_window())
|
||||
})
|
||||
.when(is_macos, |this| {
|
||||
this.on_double_click(|_, window, _| window.titlebar_double_click())
|
||||
})
|
||||
.child(
|
||||
h_flex()
|
||||
.id("bar")
|
||||
|
|
|
|||
Loading…
Reference in a new issue