fix: adapt to cosmic-theme background(transparent) accessor
Leyoda 2026 – GPLv3
This commit is contained in:
parent
00e4487038
commit
30b334693f
2 changed files with 6 additions and 6 deletions
|
|
@ -121,7 +121,7 @@ pub fn context_menu<'a>(
|
|||
entity: segmented_button::Entity,
|
||||
) -> Element<'a, Message> {
|
||||
fn key_style(theme: &cosmic::Theme) -> TextStyle {
|
||||
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()),
|
||||
|
|
@ -160,7 +160,7 @@ pub fn context_menu<'a>(
|
|||
//TODO: move style to libcosmic
|
||||
.style(|theme| {
|
||||
let cosmic = theme.cosmic();
|
||||
let component = &cosmic.background.component;
|
||||
let component = &cosmic.background(false).component;
|
||||
widget::container::Style {
|
||||
icon_color: Some(component.on.into()),
|
||||
text_color: Some(component.on.into()),
|
||||
|
|
|
|||
|
|
@ -825,7 +825,7 @@ where
|
|||
let scrollbar_color = if pressed {
|
||||
// pressed_state_color, 0.5
|
||||
cosmic_theme
|
||||
.background
|
||||
.background(false)
|
||||
.component
|
||||
.pressed
|
||||
.without_alpha()
|
||||
|
|
@ -834,7 +834,7 @@ where
|
|||
} else if hover {
|
||||
// hover_state_color, 0.2
|
||||
cosmic_theme
|
||||
.background
|
||||
.background(false)
|
||||
.component
|
||||
.hover
|
||||
.without_alpha()
|
||||
|
|
@ -921,7 +921,7 @@ where
|
|||
let scrollbar_color = if pressed {
|
||||
// pressed_state_color, 0.5
|
||||
cosmic_theme
|
||||
.background
|
||||
.background(false)
|
||||
.component
|
||||
.pressed
|
||||
.without_alpha()
|
||||
|
|
@ -930,7 +930,7 @@ where
|
|||
} else if hover {
|
||||
// hover_state_color, 0.2
|
||||
cosmic_theme
|
||||
.background
|
||||
.background(false)
|
||||
.component
|
||||
.hover
|
||||
.without_alpha()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue