From a415eb60bbf240b663886867c7bf7f2d2bf9b7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= Date: Tue, 17 Sep 2024 20:41:46 +0200 Subject: [PATCH] fix: window control button padding Makes the internal padding of window control buttons fixed (can still perfectly fit inside the Compact header bar), since they otherwise become too small when Compact. --- src/widget/header_bar.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widget/header_bar.rs b/src/widget/header_bar.rs index 2fc27b7..9868704 100644 --- a/src/widget/header_bar.rs +++ b/src/widget/header_bar.rs @@ -362,7 +362,11 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> { macro_rules! icon { ($name:expr, $size:expr, $on_press:expr) => {{ #[cfg(target_os = "linux")] - let icon = { widget::icon::from_name($name).apply(widget::button::icon) }; + let icon = { + widget::icon::from_name($name) + .apply(widget::button::icon) + .padding(8) + }; #[cfg(not(target_os = "linux"))] let icon = { @@ -373,6 +377,7 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> { ))) .symbolic(true) .apply(widget::button::icon) + .padding(8) }; icon.style(crate::theme::Button::HeaderBar)