From 6ab8eb078ec2d21d92c35d193e3600b12acf040f Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 29 Nov 2024 12:08:33 -0800 Subject: [PATCH] ui: add top spacing for sidepanel on macos also slightly increase width Signed-off-by: William Casarin --- src/ui/side_panel.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/side_panel.rs b/src/ui/side_panel.rs index f6789247..bbe9c6e9 100644 --- a/src/ui/side_panel.rs +++ b/src/ui/side_panel.rs @@ -20,7 +20,7 @@ use super::{ ProfilePic, View, }; -pub static SIDE_PANEL_WIDTH: f32 = 64.0; +pub static SIDE_PANEL_WIDTH: f32 = 68.0; static ICON_WIDTH: f32 = 40.0; pub struct DesktopSidePanel<'a> { @@ -88,6 +88,12 @@ impl<'a> DesktopSidePanel<'a> { .vertical(|ui| { let top_resp = ui .with_layout(Layout::top_down(egui::Align::Center), |ui| { + // macos needs a bit of space to make room for window + // minimize/close buttons + if cfg!(target_os = "macos") { + ui.add_space(24.0); + } + let expand_resp = ui.add(expand_side_panel_button()); ui.add_space(4.0); ui.add(milestone_name());