chore: update libcosmic after reexports were removed
This commit is contained in:
parent
04da80bb90
commit
3639bafcfa
40 changed files with 200 additions and 217 deletions
47
Cargo.lock
generated
47
Cargo.lock
generated
|
|
@ -1199,7 +1199,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
"unicode-width 0.2.2",
|
"unicode-width 0.1.14",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1388,7 +1388,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-comp-config"
|
name = "cosmic-comp-config"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-comp#f0b54315042edfc56d8e35cd1ef353d427b9a263"
|
source = "git+https://github.com/pop-os/cosmic-comp#3e84968dacb6a50a82ef5e35c0ac373c38172681"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"input",
|
"input",
|
||||||
|
|
@ -1400,7 +1400,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomicwrites",
|
"atomicwrites",
|
||||||
"cosmic-config-derive",
|
"cosmic-config-derive",
|
||||||
|
|
@ -1421,7 +1421,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.117",
|
"syn 2.0.117",
|
||||||
|
|
@ -1590,6 +1590,7 @@ dependencies = [
|
||||||
"hostname1-zbus",
|
"hostname1-zbus",
|
||||||
"i18n-embed",
|
"i18n-embed",
|
||||||
"i18n-embed-fl",
|
"i18n-embed-fl",
|
||||||
|
"iced_winit",
|
||||||
"icu",
|
"icu",
|
||||||
"image",
|
"image",
|
||||||
"indexmap 2.13.1",
|
"indexmap 2.13.1",
|
||||||
|
|
@ -1835,7 +1836,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"almost",
|
"almost",
|
||||||
"configparser",
|
"configparser",
|
||||||
|
|
@ -3252,7 +3253,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced"
|
name = "iced"
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
|
|
@ -3273,7 +3274,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"accesskit",
|
"accesskit",
|
||||||
"accesskit_winit",
|
"accesskit_winit",
|
||||||
|
|
@ -3282,7 +3283,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.11.0",
|
"bitflags 2.11.0",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -3307,7 +3308,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_core",
|
"iced_core",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -3317,7 +3318,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
|
|
@ -3331,7 +3332,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.11.0",
|
"bitflags 2.11.0",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
|
@ -3352,7 +3353,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_graphics",
|
"iced_graphics",
|
||||||
"iced_runtime",
|
"iced_runtime",
|
||||||
|
|
@ -3361,7 +3362,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_graphics",
|
"iced_graphics",
|
||||||
"iced_tiny_skia",
|
"iced_tiny_skia",
|
||||||
|
|
@ -3373,7 +3374,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
|
|
@ -3389,7 +3390,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cosmic-text",
|
"cosmic-text",
|
||||||
|
|
@ -3406,7 +3407,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
"bitflags 2.11.0",
|
"bitflags 2.11.0",
|
||||||
|
|
@ -3437,7 +3438,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
|
|
@ -3457,7 +3458,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
"cursor-icon",
|
"cursor-icon",
|
||||||
|
|
@ -4560,7 +4561,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#724351727a191516ca1b2f2f90a00b7d211c7e1f"
|
source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"apply",
|
"apply",
|
||||||
"ashpd 0.12.3",
|
"ashpd 0.12.3",
|
||||||
|
|
@ -7406,9 +7407,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",
|
||||||
|
|
@ -7478,9 +7479,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",
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ rust-version = "1.90"
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
cosmic-randr = { git = "https://github.com/pop-os/cosmic-randr" }
|
cosmic-randr = { git = "https://github.com/pop-os/cosmic-randr" }
|
||||||
tokio = { version = "1.49.0", features = ["macros"] }
|
tokio = { version = "1.49.0", features = ["macros"] }
|
||||||
|
iced_winit = { git = "https://github.com/pop-os/libcosmic", default-features = false }
|
||||||
|
|
||||||
[workspace.dependencies.libcosmic]
|
[workspace.dependencies.libcosmic]
|
||||||
features = [
|
features = [
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ indexmap = "2.13.0"
|
||||||
itertools = "0.14.0"
|
itertools = "0.14.0"
|
||||||
itoa = "1.0.17"
|
itoa = "1.0.17"
|
||||||
libcosmic.workspace = true
|
libcosmic.workspace = true
|
||||||
|
iced_winit.workspace = true
|
||||||
locale1 = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
|
locale1 = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
|
||||||
sysinfo = { version = "=0.38.0", optional = true }
|
sysinfo = { version = "=0.38.0", optional = true }
|
||||||
mime-apps = { package = "cosmic-mime-apps", git = "https://github.com/pop-os/cosmic-mime-apps", optional = true }
|
mime-apps = { package = "cosmic-mime-apps", git = "https://github.com/pop-os/cosmic-mime-apps", optional = true }
|
||||||
|
|
@ -192,6 +193,6 @@ cosmic-comp-config = ["dep:cosmic-comp-config"]
|
||||||
dbus-config = ["libcosmic/dbus-config", "cosmic-config/dbus"]
|
dbus-config = ["libcosmic/dbus-config", "cosmic-config/dbus"]
|
||||||
single-instance = ["libcosmic/single-instance"]
|
single-instance = ["libcosmic/single-instance"]
|
||||||
test = []
|
test = []
|
||||||
wayland = ["libcosmic/wayland", "dep:cosmic-panel-config", "dep:cosmic-randr"]
|
wayland = ["libcosmic/wayland", "dep:cosmic-panel-config", "dep:cosmic-randr", "iced_winit/cctk"]
|
||||||
wgpu = ["libcosmic/wgpu"]
|
wgpu = ["libcosmic/wgpu"]
|
||||||
xdg-portal = ["ashpd", "libcosmic/xdg-portal"]
|
xdg-portal = ["ashpd", "libcosmic/xdg-portal"]
|
||||||
|
|
|
||||||
|
|
@ -148,9 +148,9 @@ impl SettingsApp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn id(&self) -> cosmic::iced_core::id::Id {
|
fn id(&self) -> cosmic::iced::id::Id {
|
||||||
let cur_page_name = self.pages.info[self.active_page].id.as_ref();
|
let cur_page_name = self.pages.info[self.active_page].id.as_ref();
|
||||||
cosmic::iced_core::id::Id::new(cur_page_name.to_owned())
|
cosmic::iced::id::Id::new(cur_page_name.to_owned())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1057,7 +1057,7 @@ impl SettingsApp {
|
||||||
Message::Page(parent),
|
Message::Page(parent),
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut page_header_content: cosmic::iced_widget::Row<'_, Message, Theme> =
|
let mut page_header_content: cosmic::iced::widget::Row<'_, Message, Theme> =
|
||||||
row::with_capacity(2)
|
row::with_capacity(2)
|
||||||
.align_y(iced::Alignment::End)
|
.align_y(iced::Alignment::End)
|
||||||
.push(page_header);
|
.push(page_header);
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ use std::fmt::Write;
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Apply,
|
Apply,
|
||||||
iced::{Element, Length},
|
iced::core::text::Wrapping,
|
||||||
iced_core::text::Wrapping,
|
iced::{Element, Length, stream},
|
||||||
surface,
|
surface,
|
||||||
widget::{self, icon, settings, svg, text},
|
widget::{self, icon, settings, svg, text},
|
||||||
};
|
};
|
||||||
|
|
@ -129,7 +129,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
Ok((tx, mut rx)) => {
|
Ok((tx, mut rx)) => {
|
||||||
self.wayland_thread = Some(tx);
|
self.wayland_thread = Some(tx);
|
||||||
|
|
||||||
return cosmic::Task::stream(cosmic::iced_futures::stream::channel(
|
return cosmic::Task::stream(stream::channel(
|
||||||
1,
|
1,
|
||||||
|mut sender: futures::channel::mpsc::Sender<crate::pages::Message>| async move {
|
|mut sender: futures::channel::mpsc::Sender<crate::pages::Message>| async move {
|
||||||
while let Some(event) = rx.recv().await {
|
while let Some(event) = rx.recv().await {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Task,
|
Task,
|
||||||
cosmic_theme::{CosmicPalette, ThemeBuilder},
|
cosmic_theme::{CosmicPalette, ThemeBuilder},
|
||||||
iced_core::text::Wrapping,
|
iced::core::text::Wrapping,
|
||||||
|
iced::stream,
|
||||||
surface,
|
surface,
|
||||||
theme::CosmicTheme,
|
theme::CosmicTheme,
|
||||||
widget::{dropdown, settings, text, toggler},
|
widget::{dropdown, settings, text, toggler},
|
||||||
|
|
@ -127,7 +128,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
Ok((tx, mut rx)) => {
|
Ok((tx, mut rx)) => {
|
||||||
self.wayland_thread = Some(tx);
|
self.wayland_thread = Some(tx);
|
||||||
|
|
||||||
return cosmic::Task::stream(cosmic::iced_futures::stream::channel(
|
return cosmic::Task::stream(stream::channel(
|
||||||
1,
|
1,
|
||||||
|mut sender: futures::channel::mpsc::Sender<super::Message>| async move {
|
|mut sender: futures::channel::mpsc::Sender<super::Message>| async move {
|
||||||
while let Some(event) = rx.recv().await {
|
while let Some(event) = rx.recv().await {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use std::{
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Apply, Element, Task,
|
Apply, Element, Task,
|
||||||
cosmic_config::{self, ConfigGet, ConfigSet},
|
cosmic_config::{self, ConfigGet, ConfigSet},
|
||||||
iced::Length,
|
iced::{Length, stream},
|
||||||
surface,
|
surface,
|
||||||
widget::{self, dropdown, text},
|
widget::{self, dropdown, text},
|
||||||
};
|
};
|
||||||
|
|
@ -135,7 +135,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Forward messages from another thread to prevent the monitoring thread from blocking.
|
// Forward messages from another thread to prevent the monitoring thread from blocking.
|
||||||
let (randr_task, randr_handle) = Task::stream(cosmic::iced_futures::stream::channel(
|
let (randr_task, randr_handle) = Task::stream(stream::channel(
|
||||||
1,
|
1,
|
||||||
|mut sender: futures::channel::mpsc::Sender<_>| async move {
|
|mut sender: futures::channel::mpsc::Sender<_>| async move {
|
||||||
while let Some(message) = rx.recv().await {
|
while let Some(message) = rx.recv().await {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2024 System76 <info@system76.com>
|
// Copyright 2024 System76 <info@system76.com>
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
use cosmic::iced::core::text::Wrapping;
|
||||||
use cosmic::iced::{Alignment, Length, color};
|
use cosmic::iced::{Alignment, Length, color};
|
||||||
use cosmic::iced_core::text::Wrapping;
|
|
||||||
use cosmic::widget::{self, settings, space::horizontal as horizontal_space, text};
|
use cosmic::widget::{self, settings, space::horizontal as horizontal_space, text};
|
||||||
use cosmic::{Apply, Element, Task, theme};
|
use cosmic::{Apply, Element, Task, theme};
|
||||||
use cosmic_settings_bluetooth_subscription::*;
|
use cosmic_settings_bluetooth_subscription::*;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use cosmic::app::{ContextDrawer, context_drawer};
|
||||||
use cosmic::config::CosmicTk;
|
use cosmic::config::CosmicTk;
|
||||||
use cosmic::cosmic_config::{Config, ConfigSet};
|
use cosmic::cosmic_config::{Config, ConfigSet};
|
||||||
use cosmic::cosmic_theme::Spacing;
|
use cosmic::cosmic_theme::Spacing;
|
||||||
use cosmic::iced_core::{Color, Length};
|
use cosmic::iced::core::{Color, Length};
|
||||||
use cosmic::widget::{
|
use cosmic::widget::{
|
||||||
ColorPickerModel, color_picker::ColorPickerUpdate, container, flex_row, settings, text,
|
ColorPickerModel, color_picker::ColorPickerUpdate, container, flex_row, settings, text,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use std::sync::Arc;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Apply, Element, Task,
|
Apply, Element, Task,
|
||||||
config::{CosmicTk, FontConfig},
|
config::{CosmicTk, FontConfig},
|
||||||
iced_core::text::Wrapping,
|
iced::core::text::Wrapping,
|
||||||
widget::{self, settings, space::horizontal as horizontal_space, svg},
|
widget::{self, settings, space::horizontal as horizontal_space, svg},
|
||||||
};
|
};
|
||||||
use cosmic_config::ConfigSet;
|
use cosmic_config::ConfigSet;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use cosmic::cosmic_theme::{CornerRadii, Density, ThemeBuilder, ThemeMode};
|
||||||
#[cfg(feature = "xdg-portal")]
|
#[cfg(feature = "xdg-portal")]
|
||||||
use cosmic::dialog::file_chooser::{self, FileFilter};
|
use cosmic::dialog::file_chooser::{self, FileFilter};
|
||||||
use cosmic::iced::Subscription;
|
use cosmic::iced::Subscription;
|
||||||
use cosmic::iced_core::{Alignment, Length};
|
use cosmic::iced::core::{Alignment, Length};
|
||||||
use cosmic::widget::{
|
use cosmic::widget::{
|
||||||
button, color_picker::ColorPickerUpdate, container, radio, row, settings,
|
button, color_picker::ColorPickerUpdate, container, radio, row, settings,
|
||||||
space::horizontal as horizontal_space, text,
|
space::horizontal as horizontal_space, text,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use crate::pages::desktop::wallpaper::widgets::color_image;
|
||||||
use cosmic::cosmic_theme::Spacing;
|
use cosmic::cosmic_theme::Spacing;
|
||||||
use cosmic::cosmic_theme::palette::Srgba;
|
use cosmic::cosmic_theme::palette::Srgba;
|
||||||
use cosmic::iced::ContentFit;
|
use cosmic::iced::ContentFit;
|
||||||
use cosmic::iced_core::{Alignment, Length};
|
use cosmic::iced::core::{Alignment, Length};
|
||||||
use cosmic::widget::icon::{from_name, icon};
|
use cosmic::widget::icon::{from_name, icon};
|
||||||
use cosmic::widget::{self, button, container, settings, text};
|
use cosmic::widget::{self, button, container, settings, text};
|
||||||
use cosmic::{Apply, Element};
|
use cosmic::{Apply, Element};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use cosmic::iced_core::{Alignment, Length, text::Wrapping};
|
use cosmic::iced::core::{Alignment, Length, text::Wrapping};
|
||||||
use cosmic::widget::icon::{from_name, icon};
|
use cosmic::widget::icon::{from_name, icon};
|
||||||
use cosmic::widget::{button, container, settings, text};
|
use cosmic::widget::{button, container, settings, text};
|
||||||
use cosmic::{Apply, Element};
|
use cosmic::{Apply, Element};
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use cosmic::cosmic_theme::{
|
||||||
CornerRadii, DARK_THEME_BUILDER_ID, LIGHT_THEME_BUILDER_ID, Spacing, Theme, ThemeBuilder,
|
CornerRadii, DARK_THEME_BUILDER_ID, LIGHT_THEME_BUILDER_ID, Spacing, Theme, ThemeBuilder,
|
||||||
ThemeMode,
|
ThemeMode,
|
||||||
};
|
};
|
||||||
use cosmic::iced_core::Color;
|
use cosmic::iced::core::Color;
|
||||||
|
|
||||||
use cosmic::Task;
|
use cosmic::Task;
|
||||||
use cosmic::theme::ThemeType;
|
use cosmic::theme::ThemeType;
|
||||||
|
|
|
||||||
|
|
@ -6,22 +6,22 @@ use cosmic::iced::clipboard::dnd::{
|
||||||
use cosmic::iced::clipboard::mime::AsMimeTypes;
|
use cosmic::iced::clipboard::mime::AsMimeTypes;
|
||||||
use cosmic::iced::id::Internal;
|
use cosmic::iced::id::Internal;
|
||||||
|
|
||||||
use cosmic::iced_core;
|
use cosmic::iced;
|
||||||
use cosmic::iced_core::clipboard::IconSurface;
|
use cosmic::iced::core::clipboard::IconSurface;
|
||||||
use cosmic::widget::{Column, button, column, container, icon, list_column, row, text, text_input};
|
use cosmic::widget::{Column, button, column, container, icon, list_column, row, text, text_input};
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Apply, Element,
|
Apply, Element,
|
||||||
cosmic_config::{Config, CosmicConfigEntry},
|
cosmic_config::{Config, CosmicConfigEntry},
|
||||||
|
iced::core::{
|
||||||
|
Clipboard, Shell, Widget, layout, renderer,
|
||||||
|
widget::{Operation, Tree, tree},
|
||||||
|
},
|
||||||
|
iced::runtime::{Task, core::id::Id},
|
||||||
iced::{
|
iced::{
|
||||||
Alignment, Border, Color, Length, Point, Rectangle, Size, Vector, core::window, event,
|
Alignment, Border, Color, Length, Point, Rectangle, Size, Vector, core::window, event,
|
||||||
mouse, overlay, touch,
|
mouse, overlay, touch,
|
||||||
},
|
},
|
||||||
iced_runtime::{Task, core::id::Id},
|
|
||||||
iced_widget::core::{
|
|
||||||
Clipboard, Shell, Widget, layout, renderer,
|
|
||||||
widget::{Operation, Tree, tree},
|
|
||||||
},
|
|
||||||
theme,
|
theme,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1020,19 +1020,19 @@ where
|
||||||
));
|
));
|
||||||
|
|
||||||
let p = applet.path.to_path_buf();
|
let p = applet.path.to_path_buf();
|
||||||
iced_core::clipboard::start_dnd::<
|
iced::core::clipboard::start_dnd::<
|
||||||
cosmic::Theme,
|
cosmic::Theme,
|
||||||
cosmic::Renderer,
|
cosmic::Renderer,
|
||||||
>(
|
>(
|
||||||
clipboard,
|
clipboard,
|
||||||
false,
|
false,
|
||||||
Some(iced_core::clipboard::DndSource::Widget(
|
Some(iced::core::clipboard::DndSource::Widget(
|
||||||
self.id.clone(),
|
self.id.clone(),
|
||||||
)),
|
)),
|
||||||
Some(IconSurface::new(
|
Some(IconSurface::new(
|
||||||
dnd_icon(applet.clone(), &layout).into(),
|
dnd_icon(applet.clone(), &layout).into(),
|
||||||
iced_core::widget::tree::State::new(state.clone()),
|
iced::core::widget::tree::State::new(state.clone()),
|
||||||
iced_core::Vector::new(0.0, 0.0),
|
iced::core::Vector::new(0.0, 0.0),
|
||||||
)),
|
)),
|
||||||
Box::new(AppletString(p.clone())),
|
Box::new(AppletString(p.clone())),
|
||||||
DndAction::Move,
|
DndAction::Move,
|
||||||
|
|
@ -1241,7 +1241,7 @@ where
|
||||||
_state: &Tree,
|
_state: &Tree,
|
||||||
layout: layout::Layout<'_>,
|
layout: layout::Layout<'_>,
|
||||||
_renderer: &cosmic::Renderer,
|
_renderer: &cosmic::Renderer,
|
||||||
dnd_rectangles: &mut cosmic::iced_core::clipboard::DndDestinationRectangles,
|
dnd_rectangles: &mut cosmic::iced::core::clipboard::DndDestinationRectangles,
|
||||||
) {
|
) {
|
||||||
let Rectangle {
|
let Rectangle {
|
||||||
x,
|
x,
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@ use std::{
|
||||||
use cosmic::dialog::file_chooser;
|
use cosmic::dialog::file_chooser;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Apply, Element, Task,
|
Apply, Element, Task,
|
||||||
iced_core::text::{Ellipsize, EllipsizeHeightLimit},
|
iced::core::text::{Ellipsize, EllipsizeHeightLimit},
|
||||||
widget::{ColorPickerModel, color_picker::ColorPickerUpdate, icon},
|
widget::{ColorPickerModel, color_picker::ColorPickerUpdate, icon},
|
||||||
};
|
};
|
||||||
use cosmic::{app::ContextDrawer, iced_runtime::core::image::Handle as ImageHandle};
|
use cosmic::{app::ContextDrawer, iced::runtime::core::image::Handle as ImageHandle};
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::Subscription,
|
iced::Subscription,
|
||||||
widget::{
|
widget::{
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
use super::Message;
|
use super::Message;
|
||||||
use cosmic::iced::Radius;
|
use cosmic::iced::Radius;
|
||||||
use cosmic::iced_core::Border;
|
use cosmic::iced::core::Border;
|
||||||
use cosmic::iced_core::{self, Background, Color, Degrees, Length, gradient::Linear};
|
use cosmic::iced::core::{self, Background, Color, Degrees, Length, gradient::Linear};
|
||||||
use cosmic::iced_runtime::core::image::Handle as ImageHandle;
|
use cosmic::iced::runtime::core::image::Handle as ImageHandle;
|
||||||
use cosmic::prelude::*;
|
use cosmic::prelude::*;
|
||||||
use cosmic::widget::{Space, button, container};
|
use cosmic::widget::{Space, button, container};
|
||||||
use cosmic::{Element, iced};
|
use cosmic::{Element, iced};
|
||||||
|
|
@ -69,7 +69,7 @@ pub fn color_image<'a, M: 'a>(
|
||||||
stop += stop_increment;
|
stop += stop_increment;
|
||||||
}
|
}
|
||||||
|
|
||||||
Background::Gradient(iced_core::Gradient::Linear(linear))
|
Background::Gradient(iced::core::Gradient::Linear(linear))
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
use cosmic::Renderer;
|
use cosmic::Renderer;
|
||||||
use cosmic::iced_core::renderer::Quad;
|
use cosmic::iced::core::renderer::Quad;
|
||||||
use cosmic::iced_core::widget::{Tree, tree};
|
use cosmic::iced::core::widget::{Tree, tree};
|
||||||
use cosmic::iced_core::{
|
use cosmic::iced::core::{
|
||||||
self as core, Border, Clipboard, Element, Layout, Length, Rectangle, Renderer as IcedRenderer,
|
self as core, Border, Clipboard, Element, Layout, Length, Rectangle, Renderer as IcedRenderer,
|
||||||
Shell, Size, Widget,
|
Shell, Size, Widget,
|
||||||
};
|
};
|
||||||
use cosmic::iced_core::{Point, layout, mouse, renderer, touch};
|
use cosmic::iced::core::{Point, layout, mouse, renderer, touch};
|
||||||
use cosmic::iced_core::{alignment, text};
|
use cosmic::iced::core::{alignment, text};
|
||||||
use cosmic::widget::segmented_button::{self, SingleSelectModel};
|
use cosmic::widget::segmented_button::{self, SingleSelectModel};
|
||||||
use cosmic_randr_shell::{self as randr, OutputKey};
|
use cosmic_randr_shell::{self as randr, OutputKey};
|
||||||
use randr::Transform;
|
use randr::Transform;
|
||||||
|
|
@ -160,7 +160,7 @@ impl<Message: Clone> Widget<Message, cosmic::Theme, Renderer> for Arrangement<'_
|
||||||
fn update(
|
fn update(
|
||||||
&mut self,
|
&mut self,
|
||||||
tree: &mut Tree,
|
tree: &mut Tree,
|
||||||
event: &cosmic::iced_core::Event,
|
event: &cosmic::iced::Event,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
cursor: mouse::Cursor,
|
cursor: mouse::Cursor,
|
||||||
_renderer: &Renderer,
|
_renderer: &Renderer,
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ pub mod arrangement;
|
||||||
|
|
||||||
use crate::{app, pages};
|
use crate::{app, pages};
|
||||||
use arrangement::Arrangement;
|
use arrangement::Arrangement;
|
||||||
use cosmic::iced::{Alignment, Length, time};
|
use cosmic::iced::core::text::{Ellipsize, EllipsizeHeightLimit};
|
||||||
use cosmic::iced_core::text::{Ellipsize, EllipsizeHeightLimit};
|
use cosmic::iced::widget::scrollable::RelativeOffset;
|
||||||
use cosmic::iced_widget::scrollable::RelativeOffset;
|
use cosmic::iced::{Alignment, Length, stream, time};
|
||||||
use cosmic::widget::{
|
use cosmic::widget::{
|
||||||
self, column, container, dropdown, list_column, segmented_button, tab_bar, text, toggler,
|
self, column, container, dropdown, list_column, segmented_button, tab_bar, text, toggler,
|
||||||
};
|
};
|
||||||
|
|
@ -286,7 +286,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Forward messages from another thread to prevent the monitoring thread from blocking.
|
// Forward messages from another thread to prevent the monitoring thread from blocking.
|
||||||
let (randr_task, randr_handle) = Task::stream(cosmic::iced_futures::stream::channel(
|
let (randr_task, randr_handle) = Task::stream(stream::channel(
|
||||||
1,
|
1,
|
||||||
|mut emitter: futures::channel::mpsc::Sender<_>| async move {
|
|mut emitter: futures::channel::mpsc::Sender<_>| async move {
|
||||||
while let Some(message) = rx.recv().await {
|
while let Some(message) = rx.recv().await {
|
||||||
|
|
@ -358,7 +358,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Forward messages from the DRM hotplug thread.
|
// Forward messages from the DRM hotplug thread.
|
||||||
let (hotplug_task, hotplug_handle) = Task::stream(cosmic::iced_futures::stream::channel(
|
let (hotplug_task, hotplug_handle) = Task::stream(stream::channel(
|
||||||
1,
|
1,
|
||||||
|mut emitter: futures::channel::mpsc::Sender<pages::Message>| async move {
|
|mut emitter: futures::channel::mpsc::Sender<pages::Message>| async move {
|
||||||
while let Some(message) = rx.recv().await {
|
while let Some(message) = rx.recv().await {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
use super::{Message, NightLight};
|
use super::{Message, NightLight};
|
||||||
use crate::pages;
|
use crate::pages;
|
||||||
use cosmic::iced_core::{Alignment, Length};
|
use cosmic::iced::core::{Alignment, Length};
|
||||||
use cosmic::widget::{
|
use cosmic::widget::{
|
||||||
button, column, container, icon, list_column, row, settings, text, toggler, vertical_space,
|
button, column, container, icon, list_column, row, settings, text, toggler, vertical_space,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
use super::{ShortcutMessage, ShortcutModel};
|
use super::{ShortcutMessage, ShortcutModel};
|
||||||
use cosmic::app::ContextDrawer;
|
use cosmic::app::ContextDrawer;
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit;
|
||||||
use cosmic::{Element, Task};
|
use cosmic::{Element, Task};
|
||||||
use cosmic_settings_config::shortcuts::Action;
|
use cosmic_settings_config::shortcuts::Action;
|
||||||
use cosmic_settings_config::shortcuts::action::System as SystemAction;
|
use cosmic_settings_config::shortcuts::action::System as SystemAction;
|
||||||
|
|
@ -75,10 +76,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|
|
||||||
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
||||||
self.model.on_clear();
|
self.model.on_clear();
|
||||||
cosmic::iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
||||||
false,
|
|
||||||
)
|
|
||||||
.discard()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,15 @@ use cosmic::app::ContextDrawer;
|
||||||
use cosmic::iced::event::listen_with;
|
use cosmic::iced::event::listen_with;
|
||||||
use cosmic::iced::keyboard::key::Named;
|
use cosmic::iced::keyboard::key::Named;
|
||||||
use cosmic::iced::keyboard::{Key, Location, Modifiers};
|
use cosmic::iced::keyboard::{Key, Location, Modifiers};
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit;
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::keymap;
|
||||||
use cosmic::iced::{self, Alignment, Length};
|
use cosmic::iced::{self, Alignment, Length};
|
||||||
use cosmic::widget::{self, button, icon, settings, text};
|
use cosmic::widget::{self, button, icon, settings, text};
|
||||||
use cosmic::{Apply, Element, Task, iced_winit, theme};
|
use cosmic::{Apply, Element, Task, theme};
|
||||||
use cosmic_config::{ConfigGet, ConfigSet};
|
use cosmic_config::{ConfigGet, ConfigSet};
|
||||||
use cosmic_settings_config::shortcuts::{self, Action, Binding, Shortcuts};
|
use cosmic_settings_config::shortcuts::{self, Action, Binding, Shortcuts};
|
||||||
use cosmic_settings_page as page;
|
use cosmic_settings_page as page;
|
||||||
|
use iced_winit::conversion;
|
||||||
use slab::Slab;
|
use slab::Slab;
|
||||||
use slotmap::Key as SlotmapKey;
|
use slotmap::Key as SlotmapKey;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
@ -325,9 +328,9 @@ impl Model {
|
||||||
shortcut.reset();
|
shortcut.reset();
|
||||||
|
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
||||||
widget::text_input::focus(shortcut.id.clone()),
|
widget::text_input::focus(shortcut.id.clone()),
|
||||||
widget::text_input::select_all(shortcut.id.clone())
|
widget::text_input::select_all(shortcut.id.clone()),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -343,9 +346,9 @@ impl Model {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
||||||
widget::text_input::focus(id.clone()),
|
widget::text_input::focus(id.clone()),
|
||||||
widget::text_input::select_all(id)
|
widget::text_input::select_all(id),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -430,7 +433,7 @@ impl Model {
|
||||||
}
|
}
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if let Some(short_id) = self.shortcut_context
|
if let Some(short_id) = self.shortcut_context
|
||||||
|
|
@ -441,12 +444,12 @@ impl Model {
|
||||||
self.editing = Some(id);
|
self.editing = Some(id);
|
||||||
shortcut.input = shortcut.binding.to_string();
|
shortcut.input = shortcut.binding.to_string();
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
||||||
widget::text_input::select_all(shortcut.id.clone())
|
widget::text_input::select_all(shortcut.id.clone()),
|
||||||
]);
|
]);
|
||||||
} else if self.editing == Some(id) {
|
} else if self.editing == Some(id) {
|
||||||
self.editing = None;
|
self.editing = None;
|
||||||
return iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard();
|
return keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -530,16 +533,20 @@ impl Model {
|
||||||
// XX for now avoid applying the keycode
|
// XX for now avoid applying the keycode
|
||||||
shortcut.binding.keycode = None;
|
shortcut.binding.keycode = None;
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
self.submit_binding(id),
|
self.submit_binding(id),
|
||||||
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
cosmic::widget::text_input::focus(
|
||||||
|
self.add_keybindings_button_id.clone(),
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
} else if old.alt || old.ctrl || old.shift {
|
} else if old.alt || old.ctrl || old.shift {
|
||||||
self.editing = None;
|
self.editing = None;
|
||||||
shortcut.reset();
|
shortcut.reset();
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
cosmic::widget::text_input::focus(
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
self.add_keybindings_button_id.clone(),
|
||||||
|
),
|
||||||
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -557,7 +564,7 @@ impl Model {
|
||||||
shortcut.pending.keycode = None;
|
shortcut.pending.keycode = None;
|
||||||
shortcut.input = shortcut.pending.to_string();
|
shortcut.input = shortcut.pending.to_string();
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
self.submit_binding(id),
|
self.submit_binding(id),
|
||||||
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
||||||
]);
|
]);
|
||||||
|
|
@ -584,15 +591,19 @@ impl Model {
|
||||||
// XX for now avoid applying the keycode
|
// XX for now avoid applying the keycode
|
||||||
shortcut.binding.keycode = None;
|
shortcut.binding.keycode = None;
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
self.submit_binding(id),
|
self.submit_binding(id),
|
||||||
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
cosmic::widget::text_input::focus(
|
||||||
|
self.add_keybindings_button_id.clone(),
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
cosmic::widget::text_input::focus(
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
self.add_keybindings_button_id.clone(),
|
||||||
|
),
|
||||||
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -606,8 +617,10 @@ impl Model {
|
||||||
binding.reset();
|
binding.reset();
|
||||||
self.editing = None;
|
self.editing = None;
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
cosmic::widget::text_input::focus(self.add_keybindings_button_id.clone()),
|
cosmic::widget::text_input::focus(
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
self.add_keybindings_button_id.clone(),
|
||||||
|
),
|
||||||
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
return Task::none();
|
return Task::none();
|
||||||
|
|
@ -617,11 +630,7 @@ impl Model {
|
||||||
&& let Some(shortcut) = model.bindings.get_mut(id)
|
&& let Some(shortcut) = model.bindings.get_mut(id)
|
||||||
{
|
{
|
||||||
shortcut.pending.keycode = Some(keycode);
|
shortcut.pending.keycode = Some(keycode);
|
||||||
shortcut.pending.key =
|
shortcut.pending.key = keymap::key_to_keysym(unmodified_keysym, location);
|
||||||
iced_winit::platform_specific::wayland::keymap::key_to_keysym(
|
|
||||||
unmodified_keysym,
|
|
||||||
location,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -651,7 +660,7 @@ impl Model {
|
||||||
) {
|
) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
cosmic::iced_winit::conversion::physical_to_scancode(physical_key)
|
conversion::physical_to_scancode(physical_key)
|
||||||
.map(|code| ShortcutMessage::KeyPressed(code, key, location, modifiers))
|
.map(|code| ShortcutMessage::KeyPressed(code, key, location, modifiers))
|
||||||
}
|
}
|
||||||
iced::event::Event::Keyboard(iced::keyboard::Event::KeyReleased {
|
iced::event::Event::Keyboard(iced::keyboard::Event::KeyReleased {
|
||||||
|
|
@ -668,7 +677,7 @@ impl Model {
|
||||||
) {
|
) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
cosmic::iced_winit::conversion::physical_to_scancode(physical_key)
|
conversion::physical_to_scancode(physical_key)
|
||||||
.map(|code| ShortcutMessage::KeyReleased(code, key, location))
|
.map(|code| ShortcutMessage::KeyReleased(code, key, location))
|
||||||
}
|
}
|
||||||
iced::event::Event::Keyboard(iced::keyboard::Event::ModifiersChanged(e)) => {
|
iced::event::Event::Keyboard(iced::keyboard::Event::ModifiersChanged(e)) => {
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,15 @@ use super::{ShortcutBinding, ShortcutMessage, ShortcutModel};
|
||||||
use cosmic::app::ContextDrawer;
|
use cosmic::app::ContextDrawer;
|
||||||
use cosmic::iced::keyboard::key::Named;
|
use cosmic::iced::keyboard::key::Named;
|
||||||
use cosmic::iced::keyboard::{Key, Location, Modifiers};
|
use cosmic::iced::keyboard::{Key, Location, Modifiers};
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit;
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::keymap;
|
||||||
use cosmic::iced::{Alignment, Length};
|
use cosmic::iced::{Alignment, Length};
|
||||||
use cosmic::iced_winit;
|
|
||||||
use cosmic::widget::{self, button, icon};
|
use cosmic::widget::{self, button, icon};
|
||||||
use cosmic::{Apply, Element, Task};
|
use cosmic::{Apply, Element, Task};
|
||||||
use cosmic_settings_config::Binding;
|
use cosmic_settings_config::Binding;
|
||||||
use cosmic_settings_config::shortcuts::{Action, Shortcuts};
|
use cosmic_settings_config::shortcuts::{Action, Shortcuts};
|
||||||
use cosmic_settings_page::{self as page, Section, section};
|
use cosmic_settings_page::{self as page, Section, section};
|
||||||
|
use iced_winit::conversion;
|
||||||
use slab::Slab;
|
use slab::Slab;
|
||||||
use slotmap::{Key as SlotKey, SlotMap};
|
use slotmap::{Key as SlotKey, SlotMap};
|
||||||
|
|
||||||
|
|
@ -113,13 +115,13 @@ impl Page {
|
||||||
Message::KeyEditing(id, enable) => {
|
Message::KeyEditing(id, enable) => {
|
||||||
if enable {
|
if enable {
|
||||||
self.add_shortcut.editing = Some(id);
|
self.add_shortcut.editing = Some(id);
|
||||||
return iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard();
|
return keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard();
|
||||||
} else if self.add_shortcut.editing == Some(id) {
|
} else if self.add_shortcut.editing == Some(id) {
|
||||||
self.add_shortcut.editing = None;
|
self.add_shortcut.editing = None;
|
||||||
|
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(widget::Id::unique()),
|
widget::text_input::focus(widget::Id::unique()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +154,7 @@ impl Page {
|
||||||
self.add_shortcut.editing = Some(*index);
|
self.add_shortcut.editing = Some(*index);
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(binding.clone()),
|
widget::text_input::focus(binding.clone()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
// make a new empty binding if none exist
|
// make a new empty binding if none exist
|
||||||
|
|
@ -164,7 +166,7 @@ impl Page {
|
||||||
);
|
);
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(new_id.clone()),
|
widget::text_input::focus(new_id.clone()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -175,10 +177,7 @@ impl Page {
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(id.clone()),
|
widget::text_input::focus(id.clone()),
|
||||||
widget::text_input::select_all(id.clone()),
|
widget::text_input::select_all(id.clone()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
||||||
true,
|
|
||||||
)
|
|
||||||
.discard()
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -261,7 +260,8 @@ impl Page {
|
||||||
.keys
|
.keys
|
||||||
.get_mut(self.add_shortcut.editing.unwrap())
|
.get_mut(self.add_shortcut.editing.unwrap())
|
||||||
else {
|
else {
|
||||||
return iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard();
|
return keyboard_shortcuts_inhibit::inhibit_shortcuts(false)
|
||||||
|
.discard();
|
||||||
};
|
};
|
||||||
k.0 = binding.to_string();
|
k.0 = binding.to_string();
|
||||||
|
|
||||||
|
|
@ -270,7 +270,7 @@ impl Page {
|
||||||
{
|
{
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(widget::Id::unique()),
|
widget::text_input::focus(widget::Id::unique()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
self.add_shortcut(binding, false);
|
self.add_shortcut(binding, false);
|
||||||
|
|
@ -278,14 +278,14 @@ impl Page {
|
||||||
|
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(widget::Id::unique()),
|
widget::text_input::focus(widget::Id::unique()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
} else if old.alt || old.ctrl || old.shift {
|
} else if old.alt || old.ctrl || old.shift {
|
||||||
self.add_shortcut = Default::default();
|
self.add_shortcut = Default::default();
|
||||||
_ = self.model.on_enter();
|
_ = self.model.on_enter();
|
||||||
|
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -346,7 +346,7 @@ impl Page {
|
||||||
.keys
|
.keys
|
||||||
.get_mut(self.add_shortcut.editing.unwrap())
|
.get_mut(self.add_shortcut.editing.unwrap())
|
||||||
else {
|
else {
|
||||||
return iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard();
|
return keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard();
|
||||||
};
|
};
|
||||||
k.0 = binding.to_string();
|
k.0 = binding.to_string();
|
||||||
|
|
||||||
|
|
@ -355,7 +355,7 @@ impl Page {
|
||||||
{
|
{
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(widget::Id::unique()),
|
widget::text_input::focus(widget::Id::unique()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
self.add_shortcut(binding, false);
|
self.add_shortcut(binding, false);
|
||||||
|
|
@ -363,7 +363,7 @@ impl Page {
|
||||||
|
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(widget::Id::unique()),
|
widget::text_input::focus(widget::Id::unique()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -372,16 +372,13 @@ impl Page {
|
||||||
self.add_shortcut.editing = None;
|
self.add_shortcut.editing = None;
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(widget::Id::unique()),
|
widget::text_input::focus(widget::Id::unique()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if self.add_shortcut.active {
|
if self.add_shortcut.active {
|
||||||
self.add_shortcut.binding.keycode = Some(keycode);
|
self.add_shortcut.binding.keycode = Some(keycode);
|
||||||
self.add_shortcut.binding.key =
|
self.add_shortcut.binding.key =
|
||||||
iced_winit::platform_specific::wayland::keymap::key_to_keysym(
|
keymap::key_to_keysym(unmodified_keysym, location);
|
||||||
unmodified_keysym,
|
|
||||||
location,
|
|
||||||
);
|
|
||||||
if let Some(k) = self
|
if let Some(k) = self
|
||||||
.add_shortcut
|
.add_shortcut
|
||||||
.keys
|
.keys
|
||||||
|
|
@ -407,10 +404,7 @@ impl Page {
|
||||||
|
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
widget::text_input::focus(id.clone()),
|
widget::text_input::focus(id.clone()),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
||||||
true,
|
|
||||||
)
|
|
||||||
.discard(),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -424,10 +418,7 @@ impl Page {
|
||||||
Task::batch(vec![
|
Task::batch(vec![
|
||||||
widget::text_input::focus(new_id.clone()),
|
widget::text_input::focus(new_id.clone()),
|
||||||
widget::text_input::select_all(new_id),
|
widget::text_input::select_all(new_id),
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(true).discard(),
|
||||||
true,
|
|
||||||
)
|
|
||||||
.discard(),
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -591,10 +582,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|
|
||||||
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
||||||
self.model.on_clear();
|
self.model.on_clear();
|
||||||
iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
||||||
false,
|
|
||||||
)
|
|
||||||
.discard()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
@ -624,13 +612,11 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
) {
|
) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
cosmic::iced_winit::conversion::physical_to_scancode(physical_key).map(
|
conversion::physical_to_scancode(physical_key).map(|code| {
|
||||||
|code| {
|
|
||||||
crate::pages::Message::CustomShortcuts(Message::KeyPressed(
|
crate::pages::Message::CustomShortcuts(Message::KeyPressed(
|
||||||
code, key, location, modifiers,
|
code, key, location, modifiers,
|
||||||
))
|
))
|
||||||
},
|
})
|
||||||
)
|
|
||||||
}
|
}
|
||||||
iced::event::Event::Keyboard(iced::keyboard::Event::KeyReleased {
|
iced::event::Event::Keyboard(iced::keyboard::Event::KeyReleased {
|
||||||
key,
|
key,
|
||||||
|
|
@ -645,13 +631,11 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
) {
|
) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
cosmic::iced_winit::conversion::physical_to_scancode(physical_key).map(
|
conversion::physical_to_scancode(physical_key).map(|code| {
|
||||||
|code| {
|
|
||||||
crate::pages::Message::CustomShortcuts(Message::KeyReleased(
|
crate::pages::Message::CustomShortcuts(Message::KeyReleased(
|
||||||
code, key, location,
|
code, key, location,
|
||||||
))
|
))
|
||||||
},
|
})
|
||||||
)
|
|
||||||
}
|
}
|
||||||
iced::event::Event::Keyboard(iced::keyboard::Event::ModifiersChanged(e)) => {
|
iced::event::Event::Keyboard(iced::keyboard::Event::ModifiersChanged(e)) => {
|
||||||
Some(crate::pages::Message::CustomShortcuts(
|
Some(crate::pages::Message::CustomShortcuts(
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use super::{ShortcutMessage, ShortcutModel};
|
use super::{ShortcutMessage, ShortcutModel};
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit;
|
||||||
use cosmic::{Element, Task, app::ContextDrawer};
|
use cosmic::{Element, Task, app::ContextDrawer};
|
||||||
use cosmic_settings_config::shortcuts::Action;
|
use cosmic_settings_config::shortcuts::Action;
|
||||||
use cosmic_settings_config::shortcuts::action::ResizeDirection;
|
use cosmic_settings_config::shortcuts::action::ResizeDirection;
|
||||||
|
|
@ -70,10 +71,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|
|
||||||
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
||||||
self.model.on_clear();
|
self.model.on_clear();
|
||||||
cosmic::iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
||||||
false,
|
|
||||||
)
|
|
||||||
.discard()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
//
|
//
|
||||||
use super::{ShortcutMessage, ShortcutModel};
|
use super::{ShortcutMessage, ShortcutModel};
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit;
|
||||||
use cosmic::{Element, Task, app::ContextDrawer};
|
use cosmic::{Element, Task, app::ContextDrawer};
|
||||||
use cosmic_settings_config::shortcuts::Action;
|
use cosmic_settings_config::shortcuts::Action;
|
||||||
use cosmic_settings_config::shortcuts::action::Direction;
|
use cosmic_settings_config::shortcuts::action::Direction;
|
||||||
|
|
@ -73,10 +74,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|
|
||||||
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
||||||
self.model.on_clear();
|
self.model.on_clear();
|
||||||
cosmic::iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
||||||
false,
|
|
||||||
)
|
|
||||||
.discard()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
use super::{ShortcutMessage, ShortcutModel};
|
use super::{ShortcutMessage, ShortcutModel};
|
||||||
use cosmic::app::ContextDrawer;
|
use cosmic::app::ContextDrawer;
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit;
|
||||||
use cosmic::{Element, Task};
|
use cosmic::{Element, Task};
|
||||||
use cosmic_settings_config::shortcuts::Action;
|
use cosmic_settings_config::shortcuts::Action;
|
||||||
use cosmic_settings_config::shortcuts::action::{Direction, FocusDirection};
|
use cosmic_settings_config::shortcuts::action::{Direction, FocusDirection};
|
||||||
|
|
@ -74,10 +75,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|
|
||||||
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
||||||
self.model.on_clear();
|
self.model.on_clear();
|
||||||
cosmic::iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
||||||
false,
|
|
||||||
)
|
|
||||||
.discard()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use super::{ShortcutMessage, ShortcutModel};
|
use super::{ShortcutMessage, ShortcutModel};
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit;
|
||||||
use cosmic::{Element, Task, app::ContextDrawer};
|
use cosmic::{Element, Task, app::ContextDrawer};
|
||||||
use cosmic_settings_config::shortcuts::Action;
|
use cosmic_settings_config::shortcuts::Action;
|
||||||
use cosmic_settings_config::shortcuts::action::System as SystemAction;
|
use cosmic_settings_config::shortcuts::action::System as SystemAction;
|
||||||
|
|
@ -73,10 +74,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|
|
||||||
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
||||||
self.model.on_clear();
|
self.model.on_clear();
|
||||||
cosmic::iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
||||||
false,
|
|
||||||
)
|
|
||||||
.discard()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use super::{ShortcutMessage, ShortcutModel};
|
use super::{ShortcutMessage, ShortcutModel};
|
||||||
|
use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit;
|
||||||
use cosmic::{Element, Task, app::ContextDrawer};
|
use cosmic::{Element, Task, app::ContextDrawer};
|
||||||
use cosmic_settings_config::shortcuts::Action;
|
use cosmic_settings_config::shortcuts::Action;
|
||||||
use cosmic_settings_config::shortcuts::action::Orientation;
|
use cosmic_settings_config::shortcuts::action::Orientation;
|
||||||
|
|
@ -73,10 +74,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|
|
||||||
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
fn on_leave(&mut self) -> Task<crate::pages::Message> {
|
||||||
self.model.on_clear();
|
self.model.on_clear();
|
||||||
cosmic::iced_winit::platform_specific::commands::keyboard_shortcuts_inhibit::inhibit_shortcuts(
|
keyboard_shortcuts_inhibit::inhibit_shortcuts(false).discard()
|
||||||
false,
|
|
||||||
)
|
|
||||||
.discard()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ use cosmic::dialog::file_chooser::FileFilter;
|
||||||
use cosmic::task;
|
use cosmic::task;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Apply, Element, Task,
|
Apply, Element, Task,
|
||||||
|
iced::core::text::Wrapping,
|
||||||
iced::{Alignment, Length},
|
iced::{Alignment, Length},
|
||||||
iced_core::text::Wrapping,
|
|
||||||
widget::{self, icon, space::horizontal as horizontal_space, text_input::focus},
|
widget::{self, icon, space::horizontal as horizontal_space, text_input::focus},
|
||||||
};
|
};
|
||||||
use cosmic_settings_network_manager_subscription::nm_secret_agent::{self, PasswordFlag};
|
use cosmic_settings_network_manager_subscription::nm_secret_agent::{self, PasswordFlag};
|
||||||
|
|
@ -840,8 +840,8 @@ impl Page {
|
||||||
Message::FocusSecureInput => {
|
Message::FocusSecureInput => {
|
||||||
// retry until the widget is in the tree and focused or the dialog is removed.
|
// retry until the widget is in the tree and focused or the dialog is removed.
|
||||||
if matches!(self.dialog, Some(VpnDialog::Password { .. })) {
|
if matches!(self.dialog, Some(VpnDialog::Password { .. })) {
|
||||||
return cosmic::iced_runtime::task::widget(
|
return cosmic::iced::runtime::task::widget(
|
||||||
cosmic::iced_core::widget::operation::focusable::find_focused(),
|
cosmic::iced::core::widget::operation::focusable::find_focused(),
|
||||||
)
|
)
|
||||||
.collect()
|
.collect()
|
||||||
.then(|id| {
|
.then(|id| {
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ use anyhow::Context;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Apply, Element, Task,
|
Apply, Element, Task,
|
||||||
app::ContextDrawer,
|
app::ContextDrawer,
|
||||||
|
iced::core::text::Wrapping,
|
||||||
iced::{Alignment, Length, widget::operation::focus_next},
|
iced::{Alignment, Length, widget::operation::focus_next},
|
||||||
iced_core::text::Wrapping,
|
|
||||||
task,
|
task,
|
||||||
widget::{self, column, icon, space::horizontal as horizontal_space, text_input::focus},
|
widget::{self, column, icon, space::horizontal as horizontal_space, text_input::focus},
|
||||||
};
|
};
|
||||||
|
|
@ -751,8 +751,8 @@ impl Page {
|
||||||
Message::FocusSecureInput => {
|
Message::FocusSecureInput => {
|
||||||
// retry until the widget is in the tree and focused or the dialog is removed.
|
// retry until the widget is in the tree and focused or the dialog is removed.
|
||||||
if matches!(self.dialog, Some(WiFiDialog::Password { .. })) {
|
if matches!(self.dialog, Some(WiFiDialog::Password { .. })) {
|
||||||
return cosmic::iced_runtime::task::widget(
|
return cosmic::iced::runtime::task::widget(
|
||||||
cosmic::iced_core::widget::operation::focusable::find_focused(),
|
cosmic::iced::core::widget::operation::focusable::find_focused(),
|
||||||
)
|
)
|
||||||
.collect()
|
.collect()
|
||||||
.then(|id| {
|
.then(|id| {
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ use std::{collections::BTreeSet, sync::Arc};
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
Apply, Element, Task,
|
Apply, Element, Task,
|
||||||
|
iced::core::text::Wrapping,
|
||||||
iced::{Alignment, Length},
|
iced::{Alignment, Length},
|
||||||
iced_core::text::Wrapping,
|
|
||||||
widget::{self, icon, space::horizontal as horizontal_space},
|
widget::{self, icon, space::horizontal as horizontal_space},
|
||||||
};
|
};
|
||||||
use cosmic_dbus_networkmanager::interface::enums::DeviceState;
|
use cosmic_dbus_networkmanager::interface::enums::DeviceState;
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@ mod backend;
|
||||||
use self::backend::{GetCurrentPowerProfile, SetPowerProfile};
|
use self::backend::{GetCurrentPowerProfile, SetPowerProfile};
|
||||||
use backend::{Battery, ConnectedDevice, PowerProfile};
|
use backend::{Battery, ConnectedDevice, PowerProfile};
|
||||||
|
|
||||||
use cosmic::iced::{self, Alignment, Length};
|
use cosmic::Task;
|
||||||
use cosmic::iced_core::text::{Ellipsize, EllipsizeHeightLimit};
|
use cosmic::iced::core::text::{Ellipsize, EllipsizeHeightLimit};
|
||||||
use cosmic::iced_widget::{column, row};
|
use cosmic::iced::widget::{column, row};
|
||||||
|
use cosmic::iced::{self, Alignment, Length, stream};
|
||||||
use cosmic::widget::{self, radio, settings, space::horizontal as horizontal_space, text};
|
use cosmic::widget::{self, radio, settings, space::horizontal as horizontal_space, text};
|
||||||
use cosmic::{Apply, surface};
|
use cosmic::{Apply, surface};
|
||||||
use cosmic::{Task, iced_futures};
|
|
||||||
use cosmic_config::{Config, CosmicConfigEntry};
|
use cosmic_config::{Config, CosmicConfigEntry};
|
||||||
use cosmic_idle_config::CosmicIdleConfig;
|
use cosmic_idle_config::CosmicIdleConfig;
|
||||||
use cosmic_settings_page::{self as page, Section, section};
|
use cosmic_settings_page::{self as page, Section, section};
|
||||||
|
|
@ -144,7 +144,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|
|
||||||
// A subscription for the system battery.
|
// A subscription for the system battery.
|
||||||
let system_battery = iced::Subscription::run(|| {
|
let system_battery = iced::Subscription::run(|| {
|
||||||
iced_futures::stream::channel(1, |sender| async move {
|
stream::channel(1, |sender| async move {
|
||||||
if let Ok(proxy) = backend::get_device_proxy().await {
|
if let Ok(proxy) = backend::get_device_proxy().await {
|
||||||
receive_battery_changes(proxy, String::new(), sender, |_, b| {
|
receive_battery_changes(proxy, String::new(), sender, |_, b| {
|
||||||
Message::UpdateBattery(b)
|
Message::UpdateBattery(b)
|
||||||
|
|
@ -182,7 +182,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
|DeviceBatterySubscriptionData { proxy, path }| {
|
|DeviceBatterySubscriptionData { proxy, path }| {
|
||||||
let path = path.clone();
|
let path = path.clone();
|
||||||
let proxy = proxy.clone();
|
let proxy = proxy.clone();
|
||||||
iced_futures::stream::channel(
|
stream::channel(
|
||||||
1,
|
1,
|
||||||
move |sender: futures::channel::mpsc::Sender<
|
move |sender: futures::channel::mpsc::Sender<
|
||||||
crate::pages::Message,
|
crate::pages::Message,
|
||||||
|
|
@ -227,7 +227,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
cosmic::Task::run(
|
cosmic::Task::run(
|
||||||
iced_futures::stream::channel(
|
stream::channel(
|
||||||
1,
|
1,
|
||||||
|mut emitter: futures::channel::mpsc::Sender<Message>| async move {
|
|mut emitter: futures::channel::mpsc::Sender<Message>| async move {
|
||||||
let span =
|
let span =
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
#[cfg(feature = "wgpu")]
|
#[cfg(feature = "wgpu")]
|
||||||
use cosmic::iced_wgpu::wgpu;
|
use cosmic::iced::wgpu;
|
||||||
use std::{collections::HashMap, collections::HashSet, ffi::OsStr, process::Command};
|
use std::{collections::HashMap, collections::HashSet, ffi::OsStr, process::Command};
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use cosmic::{
|
||||||
Apply, Element, Task,
|
Apply, Element, Task,
|
||||||
app::ContextDrawer,
|
app::ContextDrawer,
|
||||||
cosmic_config::{self, ConfigGet, ConfigSet},
|
cosmic_config::{self, ConfigGet, ConfigSet},
|
||||||
iced_core::text::Wrapping,
|
iced::core::text::Wrapping,
|
||||||
surface,
|
surface,
|
||||||
widget::{self, dropdown, settings, space::horizontal as horizontal_space},
|
widget::{self, dropdown, settings, space::horizontal as horizontal_space},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ use std::rc::Rc;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use cosmic::app::{ContextDrawer, context_drawer};
|
use cosmic::app::{ContextDrawer, context_drawer};
|
||||||
|
use cosmic::iced::core::text::Wrapping;
|
||||||
use cosmic::iced::{Alignment, Length};
|
use cosmic::iced::{Alignment, Length};
|
||||||
use cosmic::iced_core::text::Wrapping;
|
|
||||||
use cosmic::widget::{self, button, space::horizontal as horizontal_space};
|
use cosmic::widget::{self, button, space::horizontal as horizontal_space};
|
||||||
use cosmic::{Apply, Element};
|
use cosmic::{Apply, Element};
|
||||||
use cosmic_config::{ConfigGet, ConfigSet};
|
use cosmic_config::{ConfigGet, ConfigSet};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use cosmic::{
|
use cosmic::iced::{
|
||||||
iced::{Subscription, stream},
|
Subscription,
|
||||||
iced_futures::futures::{self, SinkExt},
|
futures::{self, SinkExt},
|
||||||
|
stream,
|
||||||
};
|
};
|
||||||
use notify::{Config, EventKind, RecommendedWatcher, RecursiveMode, Watcher};
|
use notify::{Config, EventKind, RecommendedWatcher, RecursiveMode, Watcher};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// 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
|
||||||
|
|
||||||
use cosmic::{iced_core::Border, theme};
|
use cosmic::{iced::Border, theme};
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn display_container_frame() -> cosmic::theme::Container<'static> {
|
pub fn display_container_frame() -> cosmic::theme::Container<'static> {
|
||||||
|
|
|
||||||
|
|
@ -25,16 +25,13 @@ pub fn forward_event_loop<M: 'static + Send, T: Future<Output = ()> + Send + 'st
|
||||||
) -> (tokio::sync::oneshot::Sender<()>, cosmic::Task<M>) {
|
) -> (tokio::sync::oneshot::Sender<()>, cosmic::Task<M>) {
|
||||||
let (cancel_tx, cancel_rx) = tokio::sync::oneshot::channel::<()>();
|
let (cancel_tx, cancel_rx) = tokio::sync::oneshot::channel::<()>();
|
||||||
|
|
||||||
let task = cosmic::Task::stream(cosmic::iced_futures::stream::channel(
|
let task = cosmic::Task::stream(cosmic::iced::stream::channel(1, |emitter| async move {
|
||||||
1,
|
|
||||||
|emitter| async move {
|
|
||||||
select(
|
select(
|
||||||
std::pin::pin!(cancel_rx),
|
std::pin::pin!(cancel_rx),
|
||||||
std::pin::pin!(event_loop(emitter)),
|
std::pin::pin!(event_loop(emitter)),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
},
|
}));
|
||||||
));
|
|
||||||
|
|
||||||
(cancel_tx, task)
|
(cancel_tx, task)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use cosmic::cosmic_theme::Spacing;
|
use cosmic::cosmic_theme::Spacing;
|
||||||
|
use cosmic::iced::core::text::Wrapping;
|
||||||
use cosmic::iced::{Alignment, Length};
|
use cosmic::iced::{Alignment, Length};
|
||||||
use cosmic::iced_core::text::Wrapping;
|
|
||||||
use cosmic::widget::color_picker::ColorPickerUpdate;
|
use cosmic::widget::color_picker::ColorPickerUpdate;
|
||||||
use cosmic::widget::{
|
use cosmic::widget::{
|
||||||
self, ColorPickerModel, button, column, container, divider, icon, row, settings,
|
self, ColorPickerModel, button, column, container, divider, icon, row, settings,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
use cosmic::Task;
|
use cosmic::Task;
|
||||||
use cosmic::iced_futures::MaybeSend;
|
use cosmic::iced::stream;
|
||||||
use cosmic_pipewire as pipewire;
|
use cosmic_pipewire as pipewire;
|
||||||
use futures::{SinkExt, Stream};
|
use futures::{SinkExt, Stream};
|
||||||
use intmap::IntMap;
|
use intmap::IntMap;
|
||||||
|
|
@ -18,8 +18,8 @@ pub type NodeId = u32;
|
||||||
pub type ProfileId = i32;
|
pub type ProfileId = i32;
|
||||||
pub type RouteId = u32;
|
pub type RouteId = u32;
|
||||||
|
|
||||||
pub fn watch() -> impl Stream<Item = Message> + MaybeSend + 'static {
|
pub fn watch() -> impl Stream<Item = Message> + Send + 'static {
|
||||||
cosmic::iced_futures::stream::channel(
|
stream::channel(
|
||||||
1,
|
1,
|
||||||
|mut emitter: futures::channel::mpsc::Sender<Message>| async move {
|
|mut emitter: futures::channel::mpsc::Sender<Message>| async move {
|
||||||
loop {
|
loop {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue