commit 6ab8eb078ec2d21d92c35d193e3600b12acf040f
parent 65537b28fd8538a4a034b1eeb3d0d944623069b0
Author: William Casarin <jb55@jb55.com>
Date: Fri, 29 Nov 2024 12:08:33 -0800
ui: add top spacing for sidepanel on macos
also slightly increase width
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git 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());