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.
This commit is contained in:
Vukašin Vojinović 2024-09-17 20:41:46 +02:00 • committed by Ashley Wulber
parent 13ed47782d
commit 1cf8e3d202
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -362,7 +362,11 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> {
macro_rules! icon { macro_rules! icon {
($name:expr, $size:expr, $on_press:expr) => {{ ($name:expr, $size:expr, $on_press:expr) => {{
#[cfg(target_os = "linux")] #[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"))] #[cfg(not(target_os = "linux"))]
let icon = { let icon = {
@ -373,6 +377,7 @@ impl<'a, Message: Clone + 'static> HeaderBar<'a, Message> {
))) )))
.symbolic(true) .symbolic(true)
.apply(widget::button::icon) .apply(widget::button::icon)
.padding(8)
}; };
icon.style(crate::theme::Button::HeaderBar) icon.style(crate::theme::Button::HeaderBar)