aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main.rs94
1 files changed, 49 insertions, 45 deletions
diff --git a/src/main.rs b/src/main.rs
index 34117c3..f6a6dfb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -539,6 +539,7 @@ impl Render for Ducky {
.flex()
.items_center()
.gap_2()
+ .when(cfg!(target_os = "macos"), |s| s.pl(px(84.)))
.children(tabs)
.child(
div()
@@ -566,51 +567,54 @@ impl Render for Ducky {
}
},
))
- .child(
- div()
- .id("minimize")
- .size(px(28.))
- .rounded_md()
- .flex()
- .items_center()
- .justify_center()
- .text_size(px(14.))
- .text_color(rgb(c.muted))
- .hover(|s| s.bg(rgb(c.surface)).text_color(rgb(c.foreground)))
- .cursor_pointer()
- .child("−")
- .on_click(|_, window, _| window.minimize_window()),
- )
- .child(
- div()
- .id("maximize")
- .size(px(28.))
- .rounded_md()
- .flex()
- .items_center()
- .justify_center()
- .text_size(px(13.))
- .text_color(rgb(c.muted))
- .hover(|s| s.bg(rgb(c.surface)).text_color(rgb(c.foreground)))
- .cursor_pointer()
- .child("□")
- .on_click(|_, window, _| window.zoom_window()),
- )
- .child(
- div()
- .id("close-window")
- .size(px(28.))
- .rounded_md()
- .flex()
- .items_center()
- .justify_center()
- .text_size(px(17.))
- .text_color(rgb(c.muted))
- .hover(|s| s.bg(rgb(0x58333f)).text_color(rgb(0xf5a5b6)))
- .cursor_pointer()
- .child("×")
- .on_click(|_, window, _| window.remove_window()),
- ),
+ .when(!cfg!(target_os = "macos"), |header| {
+ header
+ .child(
+ div()
+ .id("minimize")
+ .size(px(28.))
+ .rounded_md()
+ .flex()
+ .items_center()
+ .justify_center()
+ .text_size(px(14.))
+ .text_color(rgb(c.muted))
+ .hover(|s| s.bg(rgb(c.surface)).text_color(rgb(c.foreground)))
+ .cursor_pointer()
+ .child("−")
+ .on_click(|_, window, _| window.minimize_window()),
+ )
+ .child(
+ div()
+ .id("maximize")
+ .size(px(28.))
+ .rounded_md()
+ .flex()
+ .items_center()
+ .justify_center()
+ .text_size(px(13.))
+ .text_color(rgb(c.muted))
+ .hover(|s| s.bg(rgb(c.surface)).text_color(rgb(c.foreground)))
+ .cursor_pointer()
+ .child("□")
+ .on_click(|_, window, _| window.zoom_window()),
+ )
+ .child(
+ div()
+ .id("close-window")
+ .size(px(28.))
+ .rounded_md()
+ .flex()
+ .items_center()
+ .justify_center()
+ .text_size(px(17.))
+ .text_color(rgb(c.muted))
+ .hover(|s| s.bg(rgb(0x58333f)).text_color(rgb(0xf5a5b6)))
+ .cursor_pointer()
+ .child("×")
+ .on_click(|_, window, _| window.remove_window()),
+ )
+ }),
)
.child(
div()