dix battery menu
This commit is contained in:
1 parent
ec95ae5e80
commit
2bb4c086f5
1 file changed
+29
-29
@@ -587,39 +587,39 @@ impl FereseShell {
|
|||||||
};
|
};
|
||||||
rows = rows.push(list);
|
rows = rows.push(list);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (combined || menu.kind == Menu::Audio)
|
if (combined || menu.kind == Menu::Audio)
|
||||||
&& let Some(a) = &self.status.audio
|
&& let Some(a) = &self.status.audio
|
||||||
{
|
{
|
||||||
let audio = column![
|
let audio = column![
|
||||||
row![
|
row![
|
||||||
text("Volume").size(13).width(Length::Fill),
|
text("Volume").size(13).width(Length::Fill),
|
||||||
menu_button(
|
menu_button(
|
||||||
if a.muted { "Unmute" } else { "Mute" },
|
if a.muted { "Unmute" } else { "Mute" },
|
||||||
Message::Control(Action::Mute(!a.muted)),
|
Message::Control(Action::Mute(!a.muted)),
|
||||||
primary,
|
|
||||||
p
|
|
||||||
)
|
|
||||||
]
|
|
||||||
.align_y(Alignment::Center),
|
|
||||||
text(&a.output).size(12).class(theme::Text::Color(muted)),
|
|
||||||
slider_row(
|
|
||||||
audio_icon(a.volume, a.muted),
|
|
||||||
a.volume,
|
|
||||||
false,
|
|
||||||
primary,
|
primary,
|
||||||
color_with_opacity(theme.accent, p),
|
p
|
||||||
p,
|
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
.spacing(4);
|
.align_y(Alignment::Center),
|
||||||
let audio: Element<'_, cosmic::Action<Message>> = if combined {
|
text(&a.output).size(12).class(theme::Text::Color(muted)),
|
||||||
control_card(audio.into(), primary, p)
|
slider_row(
|
||||||
} else {
|
audio_icon(a.volume, a.muted),
|
||||||
audio.into()
|
a.volume,
|
||||||
};
|
false,
|
||||||
rows = rows.push(audio);
|
primary,
|
||||||
}
|
color_with_opacity(theme.accent, p),
|
||||||
|
p,
|
||||||
|
)
|
||||||
|
]
|
||||||
|
.spacing(4);
|
||||||
|
let audio: Element<'_, cosmic::Action<Message>> = if combined {
|
||||||
|
control_card(audio.into(), primary, p)
|
||||||
|
} else {
|
||||||
|
audio.into()
|
||||||
|
};
|
||||||
|
rows = rows.push(audio);
|
||||||
}
|
}
|
||||||
|
|
||||||
if combined && let Some(value) = self.status.brightness {
|
if combined && let Some(value) = self.status.brightness {
|
||||||
|
|||||||
Reference in new issue
Block a user