chore: update to the latest libcosmic

This commit is contained in:
Hojjat 2026-04-08 13:10:59 -06:00 committed by Jacob Kauffmann
parent 9547da2b25
commit b17f8889a8
7 changed files with 98 additions and 77 deletions

80
Cargo.lock generated
View file

@ -499,9 +499,9 @@ dependencies = [
[[package]]
name = "async-signal"
version = "0.2.13"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c"
checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485"
dependencies = [
"async-io",
"async-lock",
@ -1317,7 +1317,7 @@ dependencies = [
[[package]]
name = "cosmic-config"
version = "1.0.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"atomicwrites",
"cosmic-config-derive",
@ -1338,7 +1338,7 @@ dependencies = [
[[package]]
name = "cosmic-config-derive"
version = "1.0.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"quote",
"syn",
@ -1502,7 +1502,7 @@ dependencies = [
[[package]]
name = "cosmic-theme"
version = "1.0.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"almost",
"configparser",
@ -2084,9 +2084,9 @@ checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1"
[[package]]
name = "fastrand"
version = "2.4.0"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a043dc74da1e37d6afe657061213aa6f425f855399a11d3463c6ecccc4dfda1f"
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
[[package]]
name = "fax"
@ -2762,7 +2762,7 @@ dependencies = [
"log",
"presser",
"thiserror 1.0.69",
"windows 0.56.0",
"windows 0.58.0",
]
[[package]]
@ -2968,7 +2968,7 @@ dependencies = [
"js-sys",
"log",
"wasm-bindgen",
"windows-core 0.56.0",
"windows-core 0.62.2",
]
[[package]]
@ -2983,7 +2983,7 @@ dependencies = [
[[package]]
name = "iced"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"dnd",
"iced_accessibility",
@ -3004,7 +3004,7 @@ dependencies = [
[[package]]
name = "iced_accessibility"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"accesskit",
"accesskit_winit",
@ -3013,7 +3013,7 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"bitflags 2.11.0",
"bytes",
@ -3037,7 +3037,7 @@ dependencies = [
[[package]]
name = "iced_debug"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"iced_core",
"iced_futures",
@ -3047,7 +3047,7 @@ dependencies = [
[[package]]
name = "iced_futures"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"futures",
"iced_core",
@ -3061,7 +3061,7 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"bitflags 2.11.0",
"bytemuck",
@ -3082,7 +3082,7 @@ dependencies = [
[[package]]
name = "iced_program"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"iced_graphics",
"iced_runtime",
@ -3091,7 +3091,7 @@ dependencies = [
[[package]]
name = "iced_renderer"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"iced_graphics",
"iced_tiny_skia",
@ -3103,7 +3103,7 @@ dependencies = [
[[package]]
name = "iced_runtime"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"bytes",
"cosmic-client-toolkit",
@ -3118,7 +3118,7 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"bytemuck",
"cosmic-text",
@ -3135,7 +3135,7 @@ dependencies = [
[[package]]
name = "iced_wgpu"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"as-raw-xcb-connection",
"bitflags 2.11.0",
@ -3166,7 +3166,7 @@ dependencies = [
[[package]]
name = "iced_widget"
version = "0.14.2"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"cosmic-client-toolkit",
"dnd",
@ -3184,7 +3184,7 @@ dependencies = [
[[package]]
name = "iced_winit"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"cosmic-client-toolkit",
"cursor-icon",
@ -4297,7 +4297,7 @@ checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
[[package]]
name = "libcosmic"
version = "1.0.0"
source = "git+https://github.com/pop-os/libcosmic.git#9aa87cd66b94b3d7d4dc2047e9c85b93f968d1d0"
source = "git+https://github.com/pop-os/libcosmic.git#a44cff8011d81209e18de86f24da248c88b5a28d"
dependencies = [
"apply",
"ashpd 0.12.3",
@ -7055,9 +7055,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.51.0"
version = "1.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bd1c4c0fc4a7ab90fc15ef6daaa3ec3b893f004f915f2392557ed23237820cd"
checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c"
dependencies = [
"bytes",
"libc",
@ -7127,9 +7127,9 @@ dependencies = [
[[package]]
name = "toml_edit"
version = "0.25.10+spec-1.1.0"
version = "0.25.11+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a82418ca169e235e6c399a84e395ab6debeb3bc90edc959bf0f48647c6a32d1b"
checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b"
dependencies = [
"indexmap 2.13.1",
"toml_datetime",
@ -8088,6 +8088,19 @@ dependencies = [
"windows-strings 0.4.2",
]
[[package]]
name = "windows-core"
version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [
"windows-implement 0.60.2",
"windows-interface 0.59.3",
"windows-link 0.2.1",
"windows-result 0.4.1",
"windows-strings 0.5.1",
]
[[package]]
name = "windows-future"
version = "0.2.1"
@ -8242,6 +8255,15 @@ dependencies = [
"windows-link 0.1.3",
]
[[package]]
name = "windows-strings"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
dependencies = [
"windows-link 0.2.1",
]
[[package]]
name = "windows-sys"
version = "0.48.0"
@ -9289,9 +9311,9 @@ dependencies = [
[[package]]
name = "zip"
version = "8.5.0"
version = "8.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2726508a48f38dceb22b35ecbbd2430efe34ff05c62bd3285f965d7911b33464"
checksum = "dcab981e19633ebcf0b001ddd37dd802996098bc1864f90b7c5d970ce76c1d59"
dependencies = [
"aes",
"bzip2",

View file

@ -1,6 +1,8 @@
// Copyright 2023 System76 <info@system76.com>
// SPDX-License-Identifier: GPL-3.0-only
#[cfg(all(feature = "wayland", feature = "desktop-applet"))]
use cosmic::iced::platform_specific::shell::wayland::commands::overlap_notify::overlap_notify;
#[cfg(all(feature = "wayland", feature = "desktop-applet"))]
use cosmic::iced::{
Limits, Point,
@ -12,8 +14,6 @@ use cosmic::iced::{
Anchor, KeyboardInteractivity, Layer, destroy_layer_surface, get_layer_surface,
},
};
#[cfg(all(feature = "wayland", feature = "desktop-applet"))]
use cosmic::iced_winit::commands::overlap_notify::overlap_notify;
use cosmic::{
Application, ApplicationExt, Element,
app::{self, Core, Task, context_drawer},
@ -21,6 +21,9 @@ use cosmic::{
cosmic_theme,
desktop::fde::DesktopEntry,
executor,
iced::core::widget::operation::focusable::unfocus,
iced::runtime::{clipboard, task},
iced::widget::{button::focus, scrollable::AbsoluteOffset},
iced::{
self, Alignment, Event, Length, Rectangle, Size, Subscription,
clipboard::dnd::DndAction,
@ -32,9 +35,6 @@ use cosmic::{
widget::scrollable,
window::{self, Event as WindowEvent, Id as WindowId},
},
iced_core::widget::operation::focusable::unfocus,
iced_runtime::{clipboard, task},
iced_widget::{button::focus, scrollable::AbsoluteOffset},
style, surface, theme,
widget::{
self,
@ -1253,31 +1253,28 @@ impl App {
.insert(id, (operation.clone(), controller.clone()));
// Use a task to send operations to the compio runtime thread.
cosmic::Task::stream(cosmic::iced_futures::stream::channel(
4,
move |msg_tx| async move {
let (tx, rx) = tokio::sync::oneshot::channel();
cosmic::Task::stream(cosmic::iced::stream::channel(4, move |msg_tx| async move {
let (tx, rx) = tokio::sync::oneshot::channel();
let msg_tx = Arc::new(tokio::sync::Mutex::new(msg_tx));
let msg_tx = Arc::new(tokio::sync::Mutex::new(msg_tx));
let msg_tx_clone = msg_tx.clone();
let msg_tx_clone = msg_tx.clone();
_ = compio_tx
.send(Box::pin(async move {
let msg = match operation.perform(&msg_tx_clone, controller).await {
Ok(result_paths) => Message::PendingComplete(id, result_paths),
Err(err) => Message::PendingError(id, err),
};
_ = compio_tx
.send(Box::pin(async move {
let msg = match operation.perform(&msg_tx_clone, controller).await {
Ok(result_paths) => Message::PendingComplete(id, result_paths),
Err(err) => Message::PendingError(id, err),
};
_ = tx.send(msg);
}))
.await;
_ = tx.send(msg);
}))
.await;
if let Ok(msg) = rx.await {
let _ = msg_tx.lock().await.send(msg).await;
}
},
))
if let Ok(msg) = rx.await {
let _ = msg_tx.lock().await.send(msg).await;
}
}))
.map(cosmic::Action::App)
}
@ -2054,7 +2051,8 @@ impl App {
let progress = controller.progress();
section = section.add(widget::column::with_children([
widget::row::with_children([
widget::progress_bar(0.0..=1.0, progress)
widget::determinate_linear(progress)
.width(Length::Fill)
.girth(progress_bar_height)
.into(),
if controller.is_paused() {
@ -4431,7 +4429,7 @@ impl Application for App {
use cctk::wayland_protocols::xdg::shell::client::xdg_positioner::{
Anchor, Gravity,
};
use cosmic::iced_runtime::platform_specific::wayland::popup::{
use cosmic::iced::runtime::platform_specific::wayland::popup::{
SctkPopupSettings, SctkPositioner,
};
let window_id = WindowId::unique();
@ -6178,8 +6176,9 @@ impl Application for App {
//TODO: get height from theme?
let progress_bar_height = Length::Fixed(4.0);
let progress_bar =
widget::progress_bar(0.0..=1.0, total_progress).girth(progress_bar_height);
let progress_bar = widget::determinate_linear(total_progress)
.width(Length::Fill)
.girth(progress_bar_height);
let container = widget::layer_container(widget::column::with_children([
widget::row::with_children([

View file

@ -5,6 +5,9 @@ use cosmic::{
Application, ApplicationExt, Element,
app::{Core, Task, context_drawer, cosmic::Cosmic},
cosmic_config, cosmic_theme, executor,
iced::core::widget::operation,
iced::platform_specific::shell::{self as iced_winit, SurfaceIdWrapper},
iced::widget::scrollable::AbsoluteOffset,
iced::{
self, Alignment, Event, Length, Size, Subscription,
core::SmolStr,
@ -15,9 +18,6 @@ use cosmic::{
widget::scrollable,
window,
},
iced_core::widget::operation,
iced_widget::scrollable::AbsoluteOffset,
iced_winit::{self, SurfaceIdWrapper},
theme,
widget::{
self, Operation,
@ -203,7 +203,7 @@ impl<T: AsRef<str>> From<T> for DialogLabel {
impl<'a, M: Clone + 'static> From<&'a DialogLabel> for Element<'a, M> {
fn from(label: &'a DialogLabel) -> Self {
let mut iced_spans: Vec<cosmic::iced_core::text::Span<'_, ()>> =
let mut iced_spans: Vec<cosmic::iced::core::text::Span<'_, ()>> =
Vec::with_capacity(label.spans.len());
for span in &label.spans {
iced_spans.push(cosmic::iced::widget::span(&span.text).underline(span.underline));
@ -1791,7 +1791,7 @@ impl Application for App {
use cctk::wayland_protocols::xdg::shell::client::xdg_positioner::{
Anchor, Gravity,
};
use cosmic::iced_runtime::platform_specific::wayland::popup::{
use cosmic::iced::runtime::platform_specific::wayland::popup::{
SctkPopupSettings, SctkPositioner,
};
use cosmic::iced::Rectangle;

View file

@ -1,6 +1,6 @@
use cosmic::{
iced::core::keyboard::key::Named,
iced::keyboard::Key,
iced_core::keyboard::key::Named,
widget::menu::key_bind::{KeyBind, Modifier},
};
use std::collections::HashMap;

View file

@ -1,4 +1,4 @@
use cosmic::{iced_core, iced_widget};
use cosmic::iced::{core as iced_core, widget as iced_widget};
use iced_core::event::Event;
use iced_core::layout;
use iced_core::mouse;

View file

@ -5,7 +5,7 @@ use std::time::Instant;
use crate::tab::DOUBLE_CLICK_DURATION;
use cosmic::{
Element, Renderer, Theme,
iced_core::{
iced::core::{
Clipboard, Color, Layout, Length, Point, Rectangle, Shell, Size, Vector, Widget,
border::Border,
event::Event,
@ -488,7 +488,7 @@ where
state: &Tree,
layout: Layout<'_>,
renderer: &Renderer,
dnd_rectangles: &mut cosmic::iced_core::clipboard::DndDestinationRectangles,
dnd_rectangles: &mut cosmic::iced::core::clipboard::DndDestinationRectangles,
) {
self.content.as_widget().drag_destinations(
&state.children[0],

View file

@ -2,6 +2,7 @@ use cosmic::{
Apply, Element, cosmic_theme,
desktop::fde::{DesktopEntry, get_languages_from_env},
font,
iced::core::{mouse::ScrollDelta, widget::tree},
iced::{
Alignment, Border, Color, ContentFit, Length, Point, Rectangle, Size, Subscription, Vector,
advanced::{
@ -20,7 +21,6 @@ use cosmic::{
},
window,
},
iced_core::{mouse::ScrollDelta, widget::tree},
theme,
widget::{
self, DndDestination, DndSource, Id, RcElementWrapper, Widget,
@ -6244,7 +6244,7 @@ impl Tab {
tab_view = tab_view.style(|t| {
let mut a = widget::container::Style::default();
let c = t.cosmic();
a.border = cosmic::iced_core::Border {
a.border = cosmic::iced::core::Border {
color: (c.accent_color()).into(),
width: 1.,
radius: c.radius_0().into(),
@ -6992,7 +6992,7 @@ pub fn respond_to_scroll_direction(delta: ScrollDelta, modifiers: &Modifiers) ->
fn text_editor_class(
theme: &cosmic::Theme,
status: cosmic::widget::text_editor::Status,
) -> cosmic::iced_widget::text_editor::Style {
) -> cosmic::iced::widget::text_editor::Style {
let cosmic = theme.cosmic();
let container = theme.current_container();
@ -7005,9 +7005,9 @@ fn text_editor_class(
let placeholder = placeholder.into();
match status {
cosmic::iced_widget::text_editor::Status::Active
| cosmic::iced_widget::text_editor::Status::Disabled => {
cosmic::iced_widget::text_editor::Style {
cosmic::iced::widget::text_editor::Status::Active
| cosmic::iced::widget::text_editor::Status::Disabled => {
cosmic::iced::widget::text_editor::Style {
background: background.into(),
border: cosmic::iced::Border {
radius: cosmic.corner_radii.radius_m.into(),
@ -7019,9 +7019,9 @@ fn text_editor_class(
selection,
}
}
cosmic::iced_widget::text_editor::Status::Hovered
| cosmic::iced_widget::text_editor::Status::Focused { .. } => {
cosmic::iced_widget::text_editor::Style {
cosmic::iced::widget::text_editor::Status::Hovered
| cosmic::iced::widget::text_editor::Status::Focused { .. } => {
cosmic::iced::widget::text_editor::Style {
background: background.into(),
border: cosmic::iced::Border {
radius: cosmic.corner_radii.radius_m.into(),
@ -7040,7 +7040,7 @@ fn text_editor_class(
mod tests {
use std::{fs, io, path::PathBuf};
use cosmic::{iced::mouse::ScrollDelta, iced_runtime::keyboard::Modifiers, widget};
use cosmic::{iced::mouse::ScrollDelta, iced::runtime::keyboard::Modifiers, widget};
use log::{debug, trace};
use tempfile::TempDir;
use test_log::test;