Use translucent styling for Control Center theme buttons
This commit is contained in:
1 parent
9e966f81a0
commit
24e23e2903
1 file changed
+5
-6
@@ -18,16 +18,15 @@ pub(super) fn view<'a>(shell: &'a FereseShell, mut rows: MenuRows<'a>, style: Me
|
|||||||
use ferese_config::theme::{Appearance, Mode};
|
use ferese_config::theme::{Appearance, Mode};
|
||||||
let mut modes = row([]).spacing(6);
|
let mut modes = row([]).spacing(6);
|
||||||
for (mode, label) in [(Mode::Light, "☀ Light"), (Mode::Dark, "☾ Dark"), (Mode::Auto, "◐ Auto")] {
|
for (mode, label) in [(Mode::Light, "☀ Light"), (Mode::Dark, "☾ Dark"), (Mode::Auto, "◐ Auto")] {
|
||||||
modes = modes.push(
|
modes = modes.push(motion::button(
|
||||||
button::custom(text(label).font(shell_font()).size(13))
|
button::custom(text(label).font(shell_font()).size(13))
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.padding(9)
|
.padding(9)
|
||||||
.class(ferese_theme::controls::button_style(
|
|
||||||
theme.palette(),
|
|
||||||
shell.config.theme_mode == mode,
|
|
||||||
))
|
|
||||||
.on_press(cosmic::Action::App(Message::ThemeMode(mode))),
|
.on_press(cosmic::Action::App(Message::ThemeMode(mode))),
|
||||||
);
|
primary,
|
||||||
|
shell.config.theme_mode == mode,
|
||||||
|
p,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
rows = rows.push(modes);
|
rows = rows.push(modes);
|
||||||
if shell.config.theme_mode == Mode::Auto {
|
if shell.config.theme_mode == Mode::Auto {
|
||||||
|
|||||||
Reference in new issue
Block a user