aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorduckyriley <[email protected]>2026-11-23 20:50:50 +0800
committerduckyriley <[email protected]>2026-11-23 20:50:50 +0800
commit6bb21305adcf8155a8488bc69ebddd4edc710930 (patch)
treea607bd6c2d63d3c4c51e8a395cc8ec0e1cf43d28 /src/main.rs
parent24d7f554d00901841810b856b44d5763cbc5bd76 (diff)
downloadducky-6bb21305adcf8155a8488bc69ebddd4edc710930.tar.gz
ducky-6bb21305adcf8155a8488bc69ebddd4edc710930.zip
Support macOS app bundles and document Linux distro builds
Diffstat (limited to 'src/main.rs')
-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()