battery: Autosize applet for dgpu dot
This commit is contained in:
parent
054cf4aca1
commit
8fc0733f73
1 changed files with 4 additions and 2 deletions
|
|
@ -483,7 +483,7 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
.on_press_down(Message::TogglePopup)
|
.on_press_down(Message::TogglePopup)
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
if !self.gpus.is_empty() {
|
let content = if !self.gpus.is_empty() {
|
||||||
let dot = container(vertical_space().height(Length::Fixed(0.0)))
|
let dot = container(vertical_space().height(Length::Fixed(0.0)))
|
||||||
.padding(2.0)
|
.padding(2.0)
|
||||||
.class(cosmic::style::Container::Custom(Box::new(|theme| {
|
.class(cosmic::style::Container::Custom(Box::new(|theme| {
|
||||||
|
|
@ -511,7 +511,9 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
btn
|
btn
|
||||||
}
|
};
|
||||||
|
|
||||||
|
self.core.applet.autosize_window(content).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view_window(&self, _id: window::Id) -> Element<Message> {
|
fn view_window(&self, _id: window::Id) -> Element<Message> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue