chore: update libcosmic

This commit is contained in:
Ashley Wulber 2026-04-15 15:26:53 -04:00
parent 3ef7913abd
commit 6fe510a67a
4 changed files with 82 additions and 36 deletions

90
Cargo.lock generated
View file

@ -1335,13 +1335,26 @@ dependencies = [
"libm", "libm",
] ]
[[package]]
name = "cosmic-client-toolkit"
version = "0.2.0"
source = "git+https://github.com/pop-os/cosmic-protocols?rev=32283d7#32283d76a8d0342da74c4cc022a533c52dcf378f"
dependencies = [
"bitflags 2.13.0",
"cosmic-protocols 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=32283d7)",
"libc",
"smithay-client-toolkit",
"wayland-client",
"wayland-protocols",
]
[[package]] [[package]]
name = "cosmic-client-toolkit" name = "cosmic-client-toolkit"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1#c253ec1d6804afbcdf250f5cc37ae1194bba7bd2" source = "git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1#c253ec1d6804afbcdf250f5cc37ae1194bba7bd2"
dependencies = [ dependencies = [
"bitflags 2.13.0", "bitflags 2.13.0",
"cosmic-protocols", "cosmic-protocols 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
"libc", "libc",
"smithay-client-toolkit", "smithay-client-toolkit",
"wayland-client", "wayland-client",
@ -1351,7 +1364,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"atomicwrites", "atomicwrites",
"cosmic-config-derive", "cosmic-config-derive",
@ -1372,7 +1385,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"quote", "quote",
"syn", "syn",
@ -1387,7 +1400,7 @@ dependencies = [
"bstr", "bstr",
"bzip2", "bzip2",
"compio", "compio",
"cosmic-client-toolkit", "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
"cosmic-mime-apps", "cosmic-mime-apps",
"dirs 6.0.0", "dirs 6.0.0",
"fastrand", "fastrand",
@ -1481,6 +1494,20 @@ dependencies = [
"xdg", "xdg",
] ]
[[package]]
name = "cosmic-protocols"
version = "0.2.0"
source = "git+https://github.com/pop-os/cosmic-protocols?rev=32283d7#32283d76a8d0342da74c4cc022a533c52dcf378f"
dependencies = [
"bitflags 2.13.0",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-protocols-wlr",
"wayland-scanner",
"wayland-server",
]
[[package]] [[package]]
name = "cosmic-protocols" name = "cosmic-protocols"
version = "0.2.0" version = "0.2.0"
@ -1543,13 +1570,14 @@ 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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"almost", "almost",
"configparser", "configparser",
"cosmic-config", "cosmic-config",
"csscolorparser", "csscolorparser",
"dirs 6.0.0", "dirs 6.0.0",
"hex_color",
"palette", "palette",
"ron 0.12.2", "ron 0.12.2",
"serde", "serde",
@ -2973,6 +3001,17 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "hex_color"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d37f101bf4c633f7ca2e4b5e136050314503dd198e78e325ea602c327c484ef0"
dependencies = [
"arrayvec",
"rand 0.8.6",
"serde",
]
[[package]] [[package]]
name = "hexf-parse" name = "hexf-parse"
version = "0.2.1" version = "0.2.1"
@ -3091,7 +3130,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"dnd", "dnd",
"iced_accessibility", "iced_accessibility",
@ -3112,7 +3151,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_winit", "accesskit_winit",
@ -3121,11 +3160,11 @@ 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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"bitflags 2.13.0", "bitflags 2.13.0",
"bytes", "bytes",
"cosmic-client-toolkit", "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=32283d7)",
"dnd", "dnd",
"glam", "glam",
"lilt", "lilt",
@ -3146,7 +3185,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"iced_core", "iced_core",
"iced_futures", "iced_futures",
@ -3156,7 +3195,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"futures", "futures",
"iced_core", "iced_core",
@ -3170,7 +3209,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"bitflags 2.13.0", "bitflags 2.13.0",
"bytemuck", "bytemuck",
@ -3191,7 +3230,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"iced_graphics", "iced_graphics",
"iced_runtime", "iced_runtime",
@ -3200,7 +3239,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"iced_graphics", "iced_graphics",
"iced_tiny_skia", "iced_tiny_skia",
@ -3212,10 +3251,10 @@ 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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"bytes", "bytes",
"cosmic-client-toolkit", "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=32283d7)",
"dnd", "dnd",
"iced_core", "iced_core",
"iced_futures", "iced_futures",
@ -3227,7 +3266,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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"cosmic-text", "cosmic-text",
@ -3244,12 +3283,12 @@ 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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"as-raw-xcb-connection", "as-raw-xcb-connection",
"bitflags 2.13.0", "bitflags 2.13.0",
"bytemuck", "bytemuck",
"cosmic-client-toolkit", "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=32283d7)",
"cryoglyph", "cryoglyph",
"futures", "futures",
"glam", "glam",
@ -3275,9 +3314,9 @@ 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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"cosmic-client-toolkit", "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=32283d7)",
"dnd", "dnd",
"iced_renderer", "iced_renderer",
"iced_runtime", "iced_runtime",
@ -3293,9 +3332,9 @@ 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#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"cosmic-client-toolkit", "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=32283d7)",
"cursor-icon", "cursor-icon",
"dnd", "dnd",
"iced_debug", "iced_debug",
@ -4403,12 +4442,12 @@ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
[[package]] [[package]]
name = "libcosmic" name = "libcosmic"
version = "1.0.0" version = "1.0.0"
source = "git+https://github.com/pop-os/libcosmic.git#18a7a75e3316b1f4855777af677d989467f2da74" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-v2#a792316721c18d9935a4e34b4c8a0427ea1b2544"
dependencies = [ dependencies = [
"apply", "apply",
"ashpd 0.12.3", "ashpd 0.12.3",
"auto_enums", "auto_enums",
"cosmic-client-toolkit", "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=32283d7)",
"cosmic-config", "cosmic-config",
"cosmic-freedesktop-icons", "cosmic-freedesktop-icons",
"cosmic-settings-config", "cosmic-settings-config",
@ -4416,6 +4455,7 @@ dependencies = [
"cosmic-theme", "cosmic-theme",
"css-color", "css-color",
"derive_setters", "derive_setters",
"enumflags2",
"float-cmp 0.10.0", "float-cmp 0.10.0",
"freedesktop-desktop-entry", "freedesktop-desktop-entry",
"futures", "futures",

View file

@ -149,13 +149,13 @@ tokio = { version = "1", features = ["rt", "macros"] }
# [patch.'https://github.com/pop-os/cosmic-text'] # [patch.'https://github.com/pop-os/cosmic-text']
# cosmic-text = { path = "../cosmic-text" } # cosmic-text = { path = "../cosmic-text" }
# [patch.'https://github.com/pop-os/libcosmic'] [patch.'https://github.com/pop-os/libcosmic']
# libcosmic = { path = "../libcosmic" } # libcosmic = { path = "../libcosmic" }
# cosmic-config = { path = "../libcosmic/cosmic-config" } # cosmic-config = { path = "../libcosmic/cosmic-config" }
# cosmic-theme = { path = "../libcosmic/cosmic-theme" } # cosmic-theme = { path = "../libcosmic/cosmic-theme" }
# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "iced-rebase" } libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "iced-rebase" } cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//", branch = "iced-rebase" } cosmic-theme = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
# [patch.'https://github.com/pop-os/smithay-clipboard'] # [patch.'https://github.com/pop-os/smithay-clipboard']

View file

@ -69,7 +69,7 @@ pub fn context_menu<'a>(
String::new() String::new()
}; };
fn key_style(theme: &cosmic::Theme) -> TextStyle { fn key_style(theme: &cosmic::Theme) -> TextStyle {
let mut color = theme.cosmic().background.component.on; let mut color = theme.cosmic().background(theme.transparent).component.on;
color.alpha *= 0.75; color.alpha *= 0.75;
TextStyle { TextStyle {
color: Some(color.into()), color: Some(color.into()),
@ -77,7 +77,7 @@ pub fn context_menu<'a>(
} }
} }
fn disabled_style(theme: &cosmic::Theme) -> TextStyle { fn disabled_style(theme: &cosmic::Theme) -> TextStyle {
let mut color = theme.cosmic().background.component.on; let mut color = theme.cosmic().background(theme.transparent).component.on;
color.alpha *= 0.5; color.alpha *= 0.5;
TextStyle { TextStyle {
color: Some(color.into()), color: Some(color.into()),
@ -441,7 +441,7 @@ pub fn context_menu<'a>(
//TODO: move style to libcosmic //TODO: move style to libcosmic
.style(|theme| { .style(|theme| {
let cosmic = theme.cosmic(); let cosmic = theme.cosmic();
let component = &cosmic.background.component; let component = &cosmic.background(theme.transparent).component;
container::Style { container::Style {
icon_color: Some(component.on.into()), icon_color: Some(component.on.into()),
text_color: Some(component.on.into()), text_color: Some(component.on.into()),
@ -835,7 +835,7 @@ pub fn location_context_menu<'a>(ancestor_index: usize) -> Element<'a, tab::Mess
.padding(1) .padding(1)
.style(|theme| { .style(|theme| {
let cosmic = theme.cosmic(); let cosmic = theme.cosmic();
let component = &cosmic.background.component; let component = &cosmic.background(theme.transparent).component;
container::Style { container::Style {
icon_color: Some(component.on.into()), icon_color: Some(component.on.into()),
text_color: Some(component.on.into()), text_color: Some(component.on.into()),

View file

@ -180,7 +180,9 @@ fn button_appearance(
appearance.icon_color = Some(Color::from(cosmic.on_bg_component_color())); appearance.icon_color = Some(Color::from(cosmic.on_bg_component_color()));
appearance.text_color = Some(Color::from(cosmic.on_bg_component_color())); appearance.text_color = Some(Color::from(cosmic.on_bg_component_color()));
if cut { if cut {
appearance.text_color = Some(Color::from(cosmic.background.component.on_disabled)); appearance.text_color = Some(Color::from(
cosmic.background(theme.transparent).component.on_disabled,
));
} else { } else {
appearance.text_color = Some(Color::from(cosmic.on_bg_component_color())); appearance.text_color = Some(Color::from(cosmic.on_bg_component_color()));
} }
@ -191,12 +193,16 @@ fn button_appearance(
appearance.background = Some(Color::from(cosmic.bg_color()).into()); appearance.background = Some(Color::from(cosmic.bg_color()).into());
appearance.icon_color = Some(Color::from(cosmic.on_bg_color())); appearance.icon_color = Some(Color::from(cosmic.on_bg_color()));
if cut { if cut {
appearance.text_color = Some(Color::from(cosmic.background.component.disabled)); appearance.text_color = Some(Color::from(
cosmic.background(theme.transparent).component.disabled,
));
} else { } else {
appearance.text_color = Some(Color::from(cosmic.on_bg_color())); appearance.text_color = Some(Color::from(cosmic.on_bg_color()));
} }
} else if cut { } else if cut {
appearance.text_color = Some(Color::from(cosmic.background.component.on_disabled)); appearance.text_color = Some(Color::from(
cosmic.background(theme.transparent).component.on_disabled,
));
} }
if focused && accent { if focused && accent {
appearance.outline_width = 1.0; appearance.outline_width = 1.0;