chore: udpate libcosmic

This commit is contained in:
Ashley Wulber 2025-03-14 13:14:51 -04:00 committed by Ashley Wulber
parent 61d1d1b91d
commit c54ddeb38a
17 changed files with 139 additions and 426 deletions

View file

@ -18,8 +18,7 @@ use cosmic::{
window, Alignment, Length,
},
iced_runtime::core::layout::Limits,
surface_message::{MessageWrapper, SurfaceMessage},
theme,
surface, theme,
widget::{autosize, button, divider, icon, layer_container::layer_container, text, Space},
Element, Task,
};
@ -66,8 +65,8 @@ enum PowerAction {
}
impl PowerAction {
fn perform(self) -> iced::Task<cosmic::app::Message<Message>> {
let msg = |m| cosmic::app::message::app(Message::Zbus(m));
fn perform(self) -> iced::Task<cosmic::Action<Message>> {
let msg = |m| cosmic::action::app(Message::Zbus(m));
match self {
PowerAction::Lock => iced::Task::perform(lock(), msg),
PowerAction::LogOut => iced::Task::perform(log_out(), msg),
@ -77,20 +76,6 @@ impl PowerAction {
}
}
}
impl From<Message> for MessageWrapper<Message> {
fn from(value: Message) -> Self {
match value {
Message::Surface(s) => MessageWrapper::Surface(s),
m => MessageWrapper::Message(m),
}
}
}
impl From<SurfaceMessage> for Message {
fn from(value: SurfaceMessage) -> Self {
Message::Surface(value)
}
}
#[derive(Debug, Clone)]
enum Message {
@ -99,7 +84,7 @@ enum Message {
Settings,
Zbus(Result<(), zbus::Error>),
Closed(window::Id),
Surface(SurfaceMessage),
Surface(surface::Action),
}
impl cosmic::Application for Power {