chore: updates after iced-rebase
This commit is contained in:
parent
bd0d180482
commit
71d9d6d5bb
41 changed files with 1786 additions and 2396 deletions
|
|
@ -19,7 +19,6 @@ use cctk::{
|
|||
workspace::v1::client::ext_workspace_handle_v1::ExtWorkspaceHandleV1,
|
||||
},
|
||||
};
|
||||
use cosmic::desktop::fde::{self, DesktopEntry, get_languages_from_env, unicase::Ascii};
|
||||
use cosmic::{
|
||||
Apply, Element, Task, app,
|
||||
applet::{
|
||||
|
|
@ -34,20 +33,27 @@ use cosmic::{
|
|||
clipboard::mime::{AllowedMimeTypes, AsMimeTypes},
|
||||
event::listen_with,
|
||||
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{Column, Row, column, mouse_area, row, stack, vertical_rule, vertical_space},
|
||||
widget::{
|
||||
Column, Row, column, mouse_area, row, rule::vertical as vertical_rule,
|
||||
space::horizontal as horizontal_space, space::vertical as vertical_space, stack,
|
||||
},
|
||||
window,
|
||||
},
|
||||
iced_runtime::{core::event, dnd::peek_dnd},
|
||||
surface,
|
||||
theme::{self, Button, Container},
|
||||
widget::{
|
||||
DndDestination, Image, button, container, divider, dnd_source, horizontal_space,
|
||||
DndDestination, Image, button, container, divider, dnd_source,
|
||||
icon::{self, from_name},
|
||||
image::Handle,
|
||||
rectangle_tracker::{RectangleTracker, RectangleUpdate, rectangle_tracker_subscription},
|
||||
svg, text,
|
||||
},
|
||||
};
|
||||
use cosmic::{
|
||||
desktop::fde::{self, DesktopEntry, get_languages_from_env, unicase::Ascii},
|
||||
widget::DndSource,
|
||||
};
|
||||
use cosmic_app_list_config::{APP_ID, AppListConfig};
|
||||
use cosmic_protocols::toplevel_info::v1::client::zcosmic_toplevel_handle_v1::State;
|
||||
use futures::future::pending;
|
||||
|
|
@ -295,7 +301,7 @@ impl DockItem {
|
|||
|
||||
let path = desktop_info.path.clone();
|
||||
let icon_button = if dnd_source_enabled && interaction_enabled {
|
||||
dnd_source(icon_button)
|
||||
DndSource::with_id(icon_button, cosmic::widget::Id::new("asdfasdfadfs"))
|
||||
.window(window_id)
|
||||
.drag_icon(move |_| {
|
||||
(
|
||||
|
|
@ -2410,7 +2416,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
])
|
||||
}
|
||||
|
||||
fn style(&self) -> Option<cosmic::iced_runtime::Appearance> {
|
||||
fn style(&self) -> Option<iced::theme::Style> {
|
||||
Some(cosmic::applet::style())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use cctk::{
|
|||
};
|
||||
use cosmic::{
|
||||
iced::{self, Subscription, stream},
|
||||
iced_core::image::Bytes,
|
||||
iced_core::Bytes,
|
||||
};
|
||||
use image::EncodableLayout;
|
||||
|
||||
|
|
@ -31,16 +31,15 @@ pub static WAYLAND_RX: LazyLock<Mutex<Option<UnboundedReceiver<WaylandUpdate>>>>
|
|||
LazyLock::new(|| Mutex::new(None));
|
||||
|
||||
pub fn wayland_subscription() -> iced::Subscription<WaylandUpdate> {
|
||||
Subscription::run_with_id(
|
||||
std::any::TypeId::of::<WaylandUpdate>(),
|
||||
Subscription::run_with(std::any::TypeId::of::<WaylandUpdate>(), |_| {
|
||||
stream::channel(50, move |mut output| async move {
|
||||
let mut state = State::Waiting;
|
||||
|
||||
loop {
|
||||
state = start_listening(state, &mut output).await;
|
||||
}
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
pub enum State {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue