fix: don't take screencopy on every new toplevel
This commit is contained in:
parent
ed335b256a
commit
7aead1ce47
2 changed files with 1 additions and 9 deletions
|
|
@ -431,7 +431,6 @@ const TOPLEVEL_BUTTON_HEIGHT: f32 = 130.0;
|
||||||
|
|
||||||
pub fn toplevel_button<'a, Msg>(
|
pub fn toplevel_button<'a, Msg>(
|
||||||
img: Option<WaylandImage>,
|
img: Option<WaylandImage>,
|
||||||
icon: &IconSource,
|
|
||||||
on_press: Msg,
|
on_press: Msg,
|
||||||
title: String,
|
title: String,
|
||||||
text_size: f32,
|
text_size: f32,
|
||||||
|
|
@ -456,11 +455,7 @@ where
|
||||||
.content_fit(cosmic::iced_core::ContentFit::Contain),
|
.content_fit(cosmic::iced_core::ContentFit::Contain),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Element::from(
|
Image::new(Handle::from_pixels(1, 1, vec![0, 0, 0, 255])).into()
|
||||||
icon.as_cosmic_icon()
|
|
||||||
.width(Length::Fill)
|
|
||||||
.height(Length::Fill),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.style(Container::Custom(Box::new(move |theme| {
|
.style(Container::Custom(Box::new(move |theme| {
|
||||||
container::Appearance {
|
container::Appearance {
|
||||||
|
|
@ -1475,7 +1470,6 @@ impl cosmic::Application for CosmicAppList {
|
||||||
};
|
};
|
||||||
content = content.push(toplevel_button(
|
content = content.push(toplevel_button(
|
||||||
img.clone(),
|
img.clone(),
|
||||||
&desktop_info.icon,
|
|
||||||
Message::Toggle(handle.clone()),
|
Message::Toggle(handle.clone()),
|
||||||
title,
|
title,
|
||||||
10.0,
|
10.0,
|
||||||
|
|
@ -1496,7 +1490,6 @@ impl cosmic::Application for CosmicAppList {
|
||||||
};
|
};
|
||||||
content = content.push(toplevel_button(
|
content = content.push(toplevel_button(
|
||||||
img.clone(),
|
img.clone(),
|
||||||
&desktop_info.icon,
|
|
||||||
Message::Toggle(handle.clone()),
|
Message::Toggle(handle.clone()),
|
||||||
title,
|
title,
|
||||||
10.0,
|
10.0,
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,6 @@ impl ToplevelInfoHandler for AppData {
|
||||||
toplevel.clone(),
|
toplevel.clone(),
|
||||||
info.clone(),
|
info.clone(),
|
||||||
)));
|
)));
|
||||||
self.send_image(toplevel.clone());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue