chore: update to the latest libcosmic
This commit is contained in:
parent
9547da2b25
commit
b17f8889a8
7 changed files with 98 additions and 77 deletions
80
Cargo.lock
generated
80
Cargo.lock
generated
|
|
@ -499,9 +499,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-signal"
|
name = "async-signal"
|
||||||
version = "0.2.13"
|
version = "0.2.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c"
|
checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-io",
|
"async-io",
|
||||||
"async-lock",
|
"async-lock",
|
||||||
|
|
@ -1317,7 +1317,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-config"
|
name = "cosmic-config"
|
||||||
version = "1.0.0"
|
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 = [
|
dependencies = [
|
||||||
"atomicwrites",
|
"atomicwrites",
|
||||||
"cosmic-config-derive",
|
"cosmic-config-derive",
|
||||||
|
|
@ -1338,7 +1338,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-config-derive"
|
name = "cosmic-config-derive"
|
||||||
version = "1.0.0"
|
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 = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn",
|
||||||
|
|
@ -1502,7 +1502,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-theme"
|
name = "cosmic-theme"
|
||||||
version = "1.0.0"
|
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 = [
|
dependencies = [
|
||||||
"almost",
|
"almost",
|
||||||
"configparser",
|
"configparser",
|
||||||
|
|
@ -2084,9 +2084,9 @@ checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fastrand"
|
name = "fastrand"
|
||||||
version = "2.4.0"
|
version = "2.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a043dc74da1e37d6afe657061213aa6f425f855399a11d3463c6ecccc4dfda1f"
|
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fax"
|
name = "fax"
|
||||||
|
|
@ -2762,7 +2762,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"presser",
|
"presser",
|
||||||
"thiserror 1.0.69",
|
"thiserror 1.0.69",
|
||||||
"windows 0.56.0",
|
"windows 0.58.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2968,7 +2968,7 @@ dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"windows-core 0.56.0",
|
"windows-core 0.62.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2983,7 +2983,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced"
|
name = "iced"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
|
|
@ -3004,7 +3004,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_accessibility"
|
name = "iced_accessibility"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"accesskit",
|
"accesskit",
|
||||||
"accesskit_winit",
|
"accesskit_winit",
|
||||||
|
|
@ -3013,7 +3013,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_core"
|
name = "iced_core"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"bitflags 2.11.0",
|
"bitflags 2.11.0",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -3037,7 +3037,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_debug"
|
name = "iced_debug"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"iced_core",
|
"iced_core",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -3047,7 +3047,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_futures"
|
name = "iced_futures"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
|
|
@ -3061,7 +3061,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_graphics"
|
name = "iced_graphics"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"bitflags 2.11.0",
|
"bitflags 2.11.0",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
|
@ -3082,7 +3082,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_program"
|
name = "iced_program"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"iced_graphics",
|
"iced_graphics",
|
||||||
"iced_runtime",
|
"iced_runtime",
|
||||||
|
|
@ -3091,7 +3091,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_renderer"
|
name = "iced_renderer"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"iced_graphics",
|
"iced_graphics",
|
||||||
"iced_tiny_skia",
|
"iced_tiny_skia",
|
||||||
|
|
@ -3103,7 +3103,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_runtime"
|
name = "iced_runtime"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
|
|
@ -3118,7 +3118,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_tiny_skia"
|
name = "iced_tiny_skia"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cosmic-text",
|
"cosmic-text",
|
||||||
|
|
@ -3135,7 +3135,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_wgpu"
|
name = "iced_wgpu"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
"bitflags 2.11.0",
|
"bitflags 2.11.0",
|
||||||
|
|
@ -3166,7 +3166,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_widget"
|
name = "iced_widget"
|
||||||
version = "0.14.2"
|
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 = [
|
dependencies = [
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
|
|
@ -3184,7 +3184,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_winit"
|
name = "iced_winit"
|
||||||
version = "0.14.0"
|
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 = [
|
dependencies = [
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
"cursor-icon",
|
"cursor-icon",
|
||||||
|
|
@ -4297,7 +4297,7 @@ checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libcosmic"
|
name = "libcosmic"
|
||||||
version = "1.0.0"
|
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 = [
|
dependencies = [
|
||||||
"apply",
|
"apply",
|
||||||
"ashpd 0.12.3",
|
"ashpd 0.12.3",
|
||||||
|
|
@ -7055,9 +7055,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.51.0"
|
version = "1.51.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2bd1c4c0fc4a7ab90fc15ef6daaa3ec3b893f004f915f2392557ed23237820cd"
|
checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"libc",
|
"libc",
|
||||||
|
|
@ -7127,9 +7127,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_edit"
|
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"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a82418ca169e235e6c399a84e395ab6debeb3bc90edc959bf0f48647c6a32d1b"
|
checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.13.1",
|
"indexmap 2.13.1",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
|
|
@ -8088,6 +8088,19 @@ dependencies = [
|
||||||
"windows-strings 0.4.2",
|
"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]]
|
[[package]]
|
||||||
name = "windows-future"
|
name = "windows-future"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
|
|
@ -8242,6 +8255,15 @@ dependencies = [
|
||||||
"windows-link 0.1.3",
|
"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]]
|
[[package]]
|
||||||
name = "windows-sys"
|
name = "windows-sys"
|
||||||
version = "0.48.0"
|
version = "0.48.0"
|
||||||
|
|
@ -9289,9 +9311,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zip"
|
name = "zip"
|
||||||
version = "8.5.0"
|
version = "8.5.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2726508a48f38dceb22b35ecbbd2430efe34ff05c62bd3285f965d7911b33464"
|
checksum = "dcab981e19633ebcf0b001ddd37dd802996098bc1864f90b7c5d970ce76c1d59"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
"aes",
|
||||||
"bzip2",
|
"bzip2",
|
||||||
|
|
|
||||||
57
src/app.rs
57
src/app.rs
|
|
@ -1,6 +1,8 @@
|
||||||
// Copyright 2023 System76 <info@system76.com>
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// 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"))]
|
#[cfg(all(feature = "wayland", feature = "desktop-applet"))]
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
Limits, Point,
|
Limits, Point,
|
||||||
|
|
@ -12,8 +14,6 @@ use cosmic::iced::{
|
||||||
Anchor, KeyboardInteractivity, Layer, destroy_layer_surface, get_layer_surface,
|
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::{
|
use cosmic::{
|
||||||
Application, ApplicationExt, Element,
|
Application, ApplicationExt, Element,
|
||||||
app::{self, Core, Task, context_drawer},
|
app::{self, Core, Task, context_drawer},
|
||||||
|
|
@ -21,6 +21,9 @@ use cosmic::{
|
||||||
cosmic_theme,
|
cosmic_theme,
|
||||||
desktop::fde::DesktopEntry,
|
desktop::fde::DesktopEntry,
|
||||||
executor,
|
executor,
|
||||||
|
iced::core::widget::operation::focusable::unfocus,
|
||||||
|
iced::runtime::{clipboard, task},
|
||||||
|
iced::widget::{button::focus, scrollable::AbsoluteOffset},
|
||||||
iced::{
|
iced::{
|
||||||
self, Alignment, Event, Length, Rectangle, Size, Subscription,
|
self, Alignment, Event, Length, Rectangle, Size, Subscription,
|
||||||
clipboard::dnd::DndAction,
|
clipboard::dnd::DndAction,
|
||||||
|
|
@ -32,9 +35,6 @@ use cosmic::{
|
||||||
widget::scrollable,
|
widget::scrollable,
|
||||||
window::{self, Event as WindowEvent, Id as WindowId},
|
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,
|
style, surface, theme,
|
||||||
widget::{
|
widget::{
|
||||||
self,
|
self,
|
||||||
|
|
@ -1253,31 +1253,28 @@ impl App {
|
||||||
.insert(id, (operation.clone(), controller.clone()));
|
.insert(id, (operation.clone(), controller.clone()));
|
||||||
|
|
||||||
// Use a task to send operations to the compio runtime thread.
|
// Use a task to send operations to the compio runtime thread.
|
||||||
cosmic::Task::stream(cosmic::iced_futures::stream::channel(
|
cosmic::Task::stream(cosmic::iced::stream::channel(4, move |msg_tx| async move {
|
||||||
4,
|
let (tx, rx) = tokio::sync::oneshot::channel();
|
||||||
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
|
_ = compio_tx
|
||||||
.send(Box::pin(async move {
|
.send(Box::pin(async move {
|
||||||
let msg = match operation.perform(&msg_tx_clone, controller).await {
|
let msg = match operation.perform(&msg_tx_clone, controller).await {
|
||||||
Ok(result_paths) => Message::PendingComplete(id, result_paths),
|
Ok(result_paths) => Message::PendingComplete(id, result_paths),
|
||||||
Err(err) => Message::PendingError(id, err),
|
Err(err) => Message::PendingError(id, err),
|
||||||
};
|
};
|
||||||
|
|
||||||
_ = tx.send(msg);
|
_ = tx.send(msg);
|
||||||
}))
|
}))
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
if let Ok(msg) = rx.await {
|
if let Ok(msg) = rx.await {
|
||||||
let _ = msg_tx.lock().await.send(msg).await;
|
let _ = msg_tx.lock().await.send(msg).await;
|
||||||
}
|
}
|
||||||
},
|
}))
|
||||||
))
|
|
||||||
.map(cosmic::Action::App)
|
.map(cosmic::Action::App)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2054,7 +2051,8 @@ impl App {
|
||||||
let progress = controller.progress();
|
let progress = controller.progress();
|
||||||
section = section.add(widget::column::with_children([
|
section = section.add(widget::column::with_children([
|
||||||
widget::row::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)
|
.girth(progress_bar_height)
|
||||||
.into(),
|
.into(),
|
||||||
if controller.is_paused() {
|
if controller.is_paused() {
|
||||||
|
|
@ -4431,7 +4429,7 @@ impl Application for App {
|
||||||
use cctk::wayland_protocols::xdg::shell::client::xdg_positioner::{
|
use cctk::wayland_protocols::xdg::shell::client::xdg_positioner::{
|
||||||
Anchor, Gravity,
|
Anchor, Gravity,
|
||||||
};
|
};
|
||||||
use cosmic::iced_runtime::platform_specific::wayland::popup::{
|
use cosmic::iced::runtime::platform_specific::wayland::popup::{
|
||||||
SctkPopupSettings, SctkPositioner,
|
SctkPopupSettings, SctkPositioner,
|
||||||
};
|
};
|
||||||
let window_id = WindowId::unique();
|
let window_id = WindowId::unique();
|
||||||
|
|
@ -6178,8 +6176,9 @@ impl Application for App {
|
||||||
|
|
||||||
//TODO: get height from theme?
|
//TODO: get height from theme?
|
||||||
let progress_bar_height = Length::Fixed(4.0);
|
let progress_bar_height = Length::Fixed(4.0);
|
||||||
let progress_bar =
|
let progress_bar = widget::determinate_linear(total_progress)
|
||||||
widget::progress_bar(0.0..=1.0, total_progress).girth(progress_bar_height);
|
.width(Length::Fill)
|
||||||
|
.girth(progress_bar_height);
|
||||||
|
|
||||||
let container = widget::layer_container(widget::column::with_children([
|
let container = widget::layer_container(widget::column::with_children([
|
||||||
widget::row::with_children([
|
widget::row::with_children([
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ use cosmic::{
|
||||||
Application, ApplicationExt, Element,
|
Application, ApplicationExt, Element,
|
||||||
app::{Core, Task, context_drawer, cosmic::Cosmic},
|
app::{Core, Task, context_drawer, cosmic::Cosmic},
|
||||||
cosmic_config, cosmic_theme, executor,
|
cosmic_config, cosmic_theme, executor,
|
||||||
|
iced::core::widget::operation,
|
||||||
|
iced::platform_specific::shell::{self as iced_winit, SurfaceIdWrapper},
|
||||||
|
iced::widget::scrollable::AbsoluteOffset,
|
||||||
iced::{
|
iced::{
|
||||||
self, Alignment, Event, Length, Size, Subscription,
|
self, Alignment, Event, Length, Size, Subscription,
|
||||||
core::SmolStr,
|
core::SmolStr,
|
||||||
|
|
@ -15,9 +18,6 @@ use cosmic::{
|
||||||
widget::scrollable,
|
widget::scrollable,
|
||||||
window,
|
window,
|
||||||
},
|
},
|
||||||
iced_core::widget::operation,
|
|
||||||
iced_widget::scrollable::AbsoluteOffset,
|
|
||||||
iced_winit::{self, SurfaceIdWrapper},
|
|
||||||
theme,
|
theme,
|
||||||
widget::{
|
widget::{
|
||||||
self, Operation,
|
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> {
|
impl<'a, M: Clone + 'static> From<&'a DialogLabel> for Element<'a, M> {
|
||||||
fn from(label: &'a DialogLabel) -> Self {
|
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());
|
Vec::with_capacity(label.spans.len());
|
||||||
for span in &label.spans {
|
for span in &label.spans {
|
||||||
iced_spans.push(cosmic::iced::widget::span(&span.text).underline(span.underline));
|
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::{
|
use cctk::wayland_protocols::xdg::shell::client::xdg_positioner::{
|
||||||
Anchor, Gravity,
|
Anchor, Gravity,
|
||||||
};
|
};
|
||||||
use cosmic::iced_runtime::platform_specific::wayland::popup::{
|
use cosmic::iced::runtime::platform_specific::wayland::popup::{
|
||||||
SctkPopupSettings, SctkPositioner,
|
SctkPopupSettings, SctkPositioner,
|
||||||
};
|
};
|
||||||
use cosmic::iced::Rectangle;
|
use cosmic::iced::Rectangle;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
|
iced::core::keyboard::key::Named,
|
||||||
iced::keyboard::Key,
|
iced::keyboard::Key,
|
||||||
iced_core::keyboard::key::Named,
|
|
||||||
widget::menu::key_bind::{KeyBind, Modifier},
|
widget::menu::key_bind::{KeyBind, Modifier},
|
||||||
};
|
};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
|
||||||
|
|
@ -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::event::Event;
|
||||||
use iced_core::layout;
|
use iced_core::layout;
|
||||||
use iced_core::mouse;
|
use iced_core::mouse;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use std::time::Instant;
|
||||||
use crate::tab::DOUBLE_CLICK_DURATION;
|
use crate::tab::DOUBLE_CLICK_DURATION;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Element, Renderer, Theme,
|
Element, Renderer, Theme,
|
||||||
iced_core::{
|
iced::core::{
|
||||||
Clipboard, Color, Layout, Length, Point, Rectangle, Shell, Size, Vector, Widget,
|
Clipboard, Color, Layout, Length, Point, Rectangle, Shell, Size, Vector, Widget,
|
||||||
border::Border,
|
border::Border,
|
||||||
event::Event,
|
event::Event,
|
||||||
|
|
@ -488,7 +488,7 @@ where
|
||||||
state: &Tree,
|
state: &Tree,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
renderer: &Renderer,
|
renderer: &Renderer,
|
||||||
dnd_rectangles: &mut cosmic::iced_core::clipboard::DndDestinationRectangles,
|
dnd_rectangles: &mut cosmic::iced::core::clipboard::DndDestinationRectangles,
|
||||||
) {
|
) {
|
||||||
self.content.as_widget().drag_destinations(
|
self.content.as_widget().drag_destinations(
|
||||||
&state.children[0],
|
&state.children[0],
|
||||||
|
|
|
||||||
20
src/tab.rs
20
src/tab.rs
|
|
@ -2,6 +2,7 @@ use cosmic::{
|
||||||
Apply, Element, cosmic_theme,
|
Apply, Element, cosmic_theme,
|
||||||
desktop::fde::{DesktopEntry, get_languages_from_env},
|
desktop::fde::{DesktopEntry, get_languages_from_env},
|
||||||
font,
|
font,
|
||||||
|
iced::core::{mouse::ScrollDelta, widget::tree},
|
||||||
iced::{
|
iced::{
|
||||||
Alignment, Border, Color, ContentFit, Length, Point, Rectangle, Size, Subscription, Vector,
|
Alignment, Border, Color, ContentFit, Length, Point, Rectangle, Size, Subscription, Vector,
|
||||||
advanced::{
|
advanced::{
|
||||||
|
|
@ -20,7 +21,6 @@ use cosmic::{
|
||||||
},
|
},
|
||||||
window,
|
window,
|
||||||
},
|
},
|
||||||
iced_core::{mouse::ScrollDelta, widget::tree},
|
|
||||||
theme,
|
theme,
|
||||||
widget::{
|
widget::{
|
||||||
self, DndDestination, DndSource, Id, RcElementWrapper, Widget,
|
self, DndDestination, DndSource, Id, RcElementWrapper, Widget,
|
||||||
|
|
@ -6244,7 +6244,7 @@ impl Tab {
|
||||||
tab_view = tab_view.style(|t| {
|
tab_view = tab_view.style(|t| {
|
||||||
let mut a = widget::container::Style::default();
|
let mut a = widget::container::Style::default();
|
||||||
let c = t.cosmic();
|
let c = t.cosmic();
|
||||||
a.border = cosmic::iced_core::Border {
|
a.border = cosmic::iced::core::Border {
|
||||||
color: (c.accent_color()).into(),
|
color: (c.accent_color()).into(),
|
||||||
width: 1.,
|
width: 1.,
|
||||||
radius: c.radius_0().into(),
|
radius: c.radius_0().into(),
|
||||||
|
|
@ -6992,7 +6992,7 @@ pub fn respond_to_scroll_direction(delta: ScrollDelta, modifiers: &Modifiers) ->
|
||||||
fn text_editor_class(
|
fn text_editor_class(
|
||||||
theme: &cosmic::Theme,
|
theme: &cosmic::Theme,
|
||||||
status: cosmic::widget::text_editor::Status,
|
status: cosmic::widget::text_editor::Status,
|
||||||
) -> cosmic::iced_widget::text_editor::Style {
|
) -> cosmic::iced::widget::text_editor::Style {
|
||||||
let cosmic = theme.cosmic();
|
let cosmic = theme.cosmic();
|
||||||
let container = theme.current_container();
|
let container = theme.current_container();
|
||||||
|
|
||||||
|
|
@ -7005,9 +7005,9 @@ fn text_editor_class(
|
||||||
let placeholder = placeholder.into();
|
let placeholder = placeholder.into();
|
||||||
|
|
||||||
match status {
|
match status {
|
||||||
cosmic::iced_widget::text_editor::Status::Active
|
cosmic::iced::widget::text_editor::Status::Active
|
||||||
| cosmic::iced_widget::text_editor::Status::Disabled => {
|
| cosmic::iced::widget::text_editor::Status::Disabled => {
|
||||||
cosmic::iced_widget::text_editor::Style {
|
cosmic::iced::widget::text_editor::Style {
|
||||||
background: background.into(),
|
background: background.into(),
|
||||||
border: cosmic::iced::Border {
|
border: cosmic::iced::Border {
|
||||||
radius: cosmic.corner_radii.radius_m.into(),
|
radius: cosmic.corner_radii.radius_m.into(),
|
||||||
|
|
@ -7019,9 +7019,9 @@ fn text_editor_class(
|
||||||
selection,
|
selection,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cosmic::iced_widget::text_editor::Status::Hovered
|
cosmic::iced::widget::text_editor::Status::Hovered
|
||||||
| cosmic::iced_widget::text_editor::Status::Focused { .. } => {
|
| cosmic::iced::widget::text_editor::Status::Focused { .. } => {
|
||||||
cosmic::iced_widget::text_editor::Style {
|
cosmic::iced::widget::text_editor::Style {
|
||||||
background: background.into(),
|
background: background.into(),
|
||||||
border: cosmic::iced::Border {
|
border: cosmic::iced::Border {
|
||||||
radius: cosmic.corner_radii.radius_m.into(),
|
radius: cosmic.corner_radii.radius_m.into(),
|
||||||
|
|
@ -7040,7 +7040,7 @@ fn text_editor_class(
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::{fs, io, path::PathBuf};
|
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 log::{debug, trace};
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
use test_log::test;
|
use test_log::test;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue