fix: absorb libcosmic theme-v2 API (private containers, text::Style, wgpu 28)

Leyoda 2026 – GPLv3
This commit is contained in:
Lionel DARNIS 2026-07-03 12:36:51 +02:00
parent 4fa39e5ea3
commit ba1232cffc
5 changed files with 22 additions and 47 deletions

View file

@ -1379,18 +1379,10 @@ impl Decorations<CosmicStackInternal, Message> for DefaultDecorations {
iced_widget::container::Style {
snap: true,
icon_color: Some(
cosmic_theme
.background(cosmic_theme.frosted_windows)
.on
.into(),
),
text_color: Some(
cosmic_theme
.background(cosmic_theme.frosted_windows)
.on
.into(),
),
icon_color: Some(cosmic_theme.background(false).on.into()),
text_color: Some(cosmic_theme.background(false).on.into()),
icon_color: Some(cosmic_theme.background(false).on.into()),
text_color: Some(cosmic_theme.background(false).on.into()),
background: Some(Background::Color(background.into())),
border: Border {
radius,

View file

@ -63,20 +63,12 @@ impl From<TabBackgroundTheme> for theme::Container<'_> {
snap: true,
icon_color: Some(Color::from(theme.cosmic().accent_text_color())),
text_color: Some(Color::from(theme.cosmic().accent_text_color())),
background: Some(Background::Color({
let mut color = theme
.cosmic()
.primary(theme.cosmic().frosted_windows)
.component
.selected;
if theme.cosmic().frosted_windows {
color.alpha = theme
.cosmic()
.alpha_map
.blurred_alpha(theme.cosmic().frosted);
}
color.into()
})),
background: Some(Background::Color(
theme.cosmic().primary(false).component.selected.into(),
)),
background: Some(Background::Color(
theme.cosmic().primary(false).component.selected.into(),
)),
border: Border {
radius: 0.0.into(),
width: 0.0,
@ -90,20 +82,12 @@ impl From<TabBackgroundTheme> for theme::Container<'_> {
snap: true,
icon_color: None,
text_color: None,
background: Some(Background::Color({
let mut color = theme
.cosmic()
.primary(theme.cosmic().frosted_windows)
.component
.base;
if theme.cosmic().frosted_windows {
color.alpha = theme
.cosmic()
.alpha_map
.blurred_alpha(theme.cosmic().frosted);
}
color.into()
})),
background: Some(Background::Color(
theme.cosmic().primary(false).component.base.into(),
)),
background: Some(Background::Color(
theme.cosmic().primary(false).component.base.into(),
)),
border: Border {
radius: 0.0.into(),
width: 0.0,

View file

@ -831,11 +831,8 @@ impl Program for CosmicWindowInternal {
fn background_color(&self, theme: &cosmic::Theme) -> Color {
if self.window.is_maximized(false) {
theme
.cosmic()
.background(theme.cosmic().frosted_windows)
.base
.into()
theme.cosmic().background(false).base.into()
theme.cosmic().background(false).base.into()
} else {
Color::TRANSPARENT
}

View file

@ -484,7 +484,8 @@ impl Program for ContextMenu {
.padding(1)
.class(theme::Container::custom(|theme| {
let cosmic = theme.cosmic();
let component = &cosmic.background(theme.cosmic().frosted_windows).component;
let component = &cosmic.background(false).component;
let component = &cosmic.background(false).component;
iced_widget::container::Style {
snap: true,
icon_color: Some(cosmic.accent.base.into()),

View file

@ -504,7 +504,8 @@ impl Program for ZoomProgram {
.padding(8)
.class(theme::Container::custom(|theme| {
let cosmic = theme.cosmic();
let component = &cosmic.background(theme.transparent).component;
let component = &cosmic.background(false).component;
let component = &cosmic.background(false).component;
iced_widget::container::Style {
snap: true,
icon_color: Some(component.on.into()),