chore: udpate libcosmic
This commit is contained in:
parent
61d1d1b91d
commit
c54ddeb38a
17 changed files with 139 additions and 426 deletions
|
|
@ -11,6 +11,7 @@ use cctk::{
|
|||
workspace::Workspace,
|
||||
};
|
||||
use cosmic::{
|
||||
app,
|
||||
applet::cosmic_panel_config::PanelAnchor,
|
||||
iced::{
|
||||
event,
|
||||
|
|
@ -21,7 +22,7 @@ use cosmic::{
|
|||
Length, Limits, Subscription,
|
||||
},
|
||||
iced_core::{Background, Border},
|
||||
surface_message::{MessageWrapper, SurfaceMessage},
|
||||
surface,
|
||||
widget::{autosize, container, horizontal_space, vertical_space, Id},
|
||||
Element, Task, Theme,
|
||||
};
|
||||
|
|
@ -94,22 +95,7 @@ enum Message {
|
|||
WorkspacePressed(ExtWorkspaceHandleV1),
|
||||
WheelScrolled(ScrollDelta),
|
||||
WorkspaceOverview,
|
||||
Surface(SurfaceMessage),
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
Surface(surface::Action),
|
||||
}
|
||||
|
||||
impl cosmic::Application for IcedWorkspacesApplet {
|
||||
|
|
@ -118,13 +104,7 @@ impl cosmic::Application for IcedWorkspacesApplet {
|
|||
type Flags = ();
|
||||
const APP_ID: &'static str = config::APP_ID;
|
||||
|
||||
fn init(
|
||||
core: cosmic::app::Core,
|
||||
_flags: Self::Flags,
|
||||
) -> (
|
||||
Self,
|
||||
cosmic::iced::Task<cosmic::app::Message<Self::Message>>,
|
||||
) {
|
||||
fn init(core: cosmic::app::Core, _flags: Self::Flags) -> (Self, app::Task<Self::Message>) {
|
||||
(
|
||||
Self {
|
||||
layout: match &core.applet.anchor {
|
||||
|
|
@ -150,10 +130,7 @@ impl cosmic::Application for IcedWorkspacesApplet {
|
|||
&mut self.core
|
||||
}
|
||||
|
||||
fn update(
|
||||
&mut self,
|
||||
message: Self::Message,
|
||||
) -> cosmic::iced::Task<cosmic::app::Message<Self::Message>> {
|
||||
fn update(&mut self, message: Self::Message) -> app::Task<Self::Message> {
|
||||
match message {
|
||||
Message::WorkspaceUpdate(msg) => match msg {
|
||||
WorkspacesUpdate::Workspaces(mut list) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue