fix(battery): show discrete gpu name
This commit is contained in:
parent
81dbf62724
commit
668b0825c9
1 changed files with 24 additions and 26 deletions
|
|
@ -590,33 +590,31 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
}
|
}
|
||||||
|
|
||||||
content.push(
|
content.push(
|
||||||
menu_button(row![
|
menu_button(
|
||||||
text(fl!(
|
row![
|
||||||
"dgpu-applications",
|
text(fl!(
|
||||||
gpu_name = if self.gpus.len() == 1 {
|
"dgpu-applications",
|
||||||
String::new()
|
gpu_name = format!("\"{}\"", gpu.name)
|
||||||
} else {
|
))
|
||||||
format!("\"{}\"", gpu.name)
|
|
||||||
}
|
|
||||||
))
|
|
||||||
.size(14)
|
|
||||||
.width(Length::Fill)
|
|
||||||
.height(Length::Fixed(24.0))
|
|
||||||
.vertical_alignment(Vertical::Center),
|
|
||||||
container(
|
|
||||||
icon::from_name(if gpu.toggled {
|
|
||||||
"go-down-symbolic"
|
|
||||||
} else {
|
|
||||||
"go-up-symbolic"
|
|
||||||
})
|
|
||||||
.size(14)
|
.size(14)
|
||||||
.symbolic(true)
|
.width(Length::Fill)
|
||||||
)
|
.vertical_alignment(Vertical::Center),
|
||||||
.align_x(Horizontal::Center)
|
container(
|
||||||
.align_y(Vertical::Center)
|
icon::from_name(if gpu.toggled {
|
||||||
.width(Length::Fixed(24.0))
|
"go-down-symbolic"
|
||||||
.height(Length::Fixed(24.0)),
|
} else {
|
||||||
])
|
"go-up-symbolic"
|
||||||
|
})
|
||||||
|
.size(14)
|
||||||
|
.symbolic(true)
|
||||||
|
)
|
||||||
|
.align_x(Horizontal::Center)
|
||||||
|
.align_y(Vertical::Center)
|
||||||
|
.width(Length::Fixed(24.0))
|
||||||
|
.height(Length::Fixed(24.0)),
|
||||||
|
]
|
||||||
|
.align_items(Alignment::Center),
|
||||||
|
)
|
||||||
.on_press(Message::ToggleGpuApps(key.clone()))
|
.on_press(Message::ToggleGpuApps(key.clone()))
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue