fix: absorb libcosmic theme-v2 API (private containers, text::Style, wgpu 28)
Leyoda 2026 – GPLv3
This commit is contained in:
parent
58b0598de8
commit
9141780b30
5 changed files with 11 additions and 9 deletions
|
|
@ -1364,8 +1364,8 @@ impl Decorations<CosmicStackInternal, Message> for DefaultDecorations {
|
|||
|
||||
iced_widget::container::Style {
|
||||
snap: true,
|
||||
icon_color: Some(cosmic_theme.background.on.into()),
|
||||
text_color: Some(cosmic_theme.background.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,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ impl From<TabBackgroundTheme> for theme::Container<'_> {
|
|||
icon_color: Some(Color::from(theme.cosmic().accent_text_color())),
|
||||
text_color: Some(Color::from(theme.cosmic().accent_text_color())),
|
||||
background: Some(Background::Color(
|
||||
theme.cosmic().primary.component.selected.into(),
|
||||
theme.cosmic().primary(false).component.selected.into(),
|
||||
)),
|
||||
border: Border {
|
||||
radius: 0.0.into(),
|
||||
|
|
@ -81,7 +81,7 @@ impl From<TabBackgroundTheme> for theme::Container<'_> {
|
|||
icon_color: None,
|
||||
text_color: None,
|
||||
background: Some(Background::Color(
|
||||
theme.cosmic().primary.component.base.into(),
|
||||
theme.cosmic().primary(false).component.base.into(),
|
||||
)),
|
||||
border: Border {
|
||||
radius: 0.0.into(),
|
||||
|
|
|
|||
|
|
@ -826,7 +826,7 @@ impl Program for CosmicWindowInternal {
|
|||
|
||||
fn background_color(&self, theme: &cosmic::Theme) -> Color {
|
||||
if self.window.is_maximized(false) {
|
||||
theme.cosmic().background.base.into()
|
||||
theme.cosmic().background(false).base.into()
|
||||
} else {
|
||||
Color::TRANSPARENT
|
||||
}
|
||||
|
|
|
|||
|
|
@ -428,10 +428,11 @@ impl Program for ContextMenu {
|
|||
.width(mode)
|
||||
.class(if *disabled {
|
||||
theme::Text::Custom(|theme| {
|
||||
let mut color = theme.cosmic().background.component.on;
|
||||
let mut color = theme.cosmic().background(false).component.on;
|
||||
color.alpha *= 0.5;
|
||||
TextStyle {
|
||||
color: Some(color.into()),
|
||||
..Default::default()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
@ -446,10 +447,11 @@ impl Program for ContextMenu {
|
|||
.align_x(Horizontal::Right)
|
||||
.width(Length::Shrink)
|
||||
.class(theme::Text::Custom(|theme| {
|
||||
let mut color = theme.cosmic().background.component.on;
|
||||
let mut color = theme.cosmic().background(false).component.on;
|
||||
color.alpha *= 0.75;
|
||||
TextStyle {
|
||||
color: Some(color.into()),
|
||||
..Default::default()
|
||||
}
|
||||
}))
|
||||
.into(),
|
||||
|
|
@ -474,7 +476,7 @@ impl Program for ContextMenu {
|
|||
.padding(1)
|
||||
.class(theme::Container::custom(|theme| {
|
||||
let cosmic = theme.cosmic();
|
||||
let component = &cosmic.background.component;
|
||||
let component = &cosmic.background(false).component;
|
||||
iced_widget::container::Style {
|
||||
snap: true,
|
||||
icon_color: Some(cosmic.accent.base.into()),
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ impl Program for ZoomProgram {
|
|||
.padding(8)
|
||||
.class(theme::Container::custom(|theme| {
|
||||
let cosmic = theme.cosmic();
|
||||
let component = &cosmic.background.component;
|
||||
let component = &cosmic.background(false).component;
|
||||
iced_widget::container::Style {
|
||||
snap: true,
|
||||
icon_color: Some(component.on.into()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue