From 3a6b1b672015dd51eddc5e1f10668fb7607820ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= Date: Sat, 21 Sep 2024 03:14:59 +0200 Subject: [PATCH] fix(audio): fix padding --- cosmic-applet-audio/src/lib.rs | 3 +-- cosmic-applet-power/src/lib.rs | 13 ++++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cosmic-applet-audio/src/lib.rs b/cosmic-applet-audio/src/lib.rs index 9d4a30a8..5f0fbde9 100644 --- a/cosmic-applet-audio/src/lib.rs +++ b/cosmic-applet-audio/src/lib.rs @@ -938,8 +938,7 @@ impl cosmic::Application for Audio { ) .text_size(14) .width(Length::Fill) - ) - .padding([8, 24]), + ), padded_control(divider::horizontal::default()).padding([space_xxs, space_s]), menu_button(text::body(fl!("sound-settings"))).on_press(Message::OpenSettings) ] diff --git a/cosmic-applet-power/src/lib.rs b/cosmic-applet-power/src/lib.rs index ee22d892..252a3707 100644 --- a/cosmic-applet-power/src/lib.rs +++ b/cosmic-applet-power/src/lib.rs @@ -249,7 +249,10 @@ impl cosmic::Application for Power { fn view_window(&self, id: window::Id) -> Element { let Spacing { - space_xxs, space_s, .. + space_xxs, + space_s, + space_m, + .. } = theme::active().cosmic().spacing; if matches!(self.popup, Some(p) if p == id) { @@ -264,7 +267,7 @@ impl cosmic::Application for Power { text::body(fl!("lock-screen-shortcut")), ] .align_items(Alignment::Center) - .spacing(8) + .spacing(space_xxs) ) .on_press(Message::Action(PowerAction::Lock)), menu_button( @@ -275,7 +278,7 @@ impl cosmic::Application for Power { text::body(fl!("log-out-shortcut")), ] .align_items(Alignment::Center) - .spacing(8) + .spacing(space_xxs) ) .on_press(Message::Action(PowerAction::LogOut)), ]; @@ -288,8 +291,8 @@ impl cosmic::Application for Power { power_buttons("system-shutdown-symbolic", fl!("shutdown")) .on_press(Message::Action(PowerAction::Shutdown)), ] - .spacing(24) - .padding([0, 24]); + .spacing(space_m) + .padding([0, space_m]); let content = column![ settings,