From 6bb21305adcf8155a8488bc69ebddd4edc710930 Mon Sep 17 00:00:00 2001 From: duckyriley Date: Mon, 23 Nov 2026 20:50:50 +0800 Subject: Support macOS app bundles and document Linux distro builds --- src/main.rs | 94 ++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 45 deletions(-) (limited to 'src/main.rs') 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() -- cgit v1.2.3