refactor(applet): move applet module to crate root

This commit is contained in:
Michael Aaron Murphy 2023-09-18 07:45:11 +02:00
parent 69cd9a3bfa
commit 8f7b400143
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
6 changed files with 20 additions and 17 deletions

View file

@ -3,5 +3,5 @@ use crate::window::Window;
mod window;
fn main() -> cosmic::iced::Result {
cosmic::app::applet::run::<Window>(true, ())
cosmic::applet::run::<Window>(true, ())
}

View file

@ -65,7 +65,7 @@ impl cosmic::Application for Window {
self.popup.replace(new_id);
let mut popup_settings =
self.core
.applet_helper
.applet
.get_popup_settings(Id(0), new_id, None, None, None);
popup_settings.positioner.size_limits = Limits::NONE
.max_width(372.0)
@ -87,7 +87,7 @@ impl cosmic::Application for Window {
fn view(&self) -> Element<Self::Message> {
self.core
.applet_helper
.applet
.icon_button(ID)
.on_press(Message::TogglePopup)
.style(Button::Text)
@ -102,10 +102,10 @@ impl cosmic::Application for Window {
}),
));
self.core.applet_helper.popup_container(content_list).into()
self.core.applet.popup_container(content_list).into()
}
fn style(&self) -> Option<<Theme as application::StyleSheet>::Style> {
Some(cosmic::app::applet::style())
Some(cosmic::applet::style())
}
}