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,
|
entity: segmented_button::Entity,
|
||||||
) -> Element<'a, Message> {
|
) -> Element<'a, Message> {
|
||||||
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(false).component.on;
|
||||||
color.alpha *= 0.75;
|
color.alpha *= 0.75;
|
||||||
TextStyle {
|
TextStyle {
|
||||||
color: Some(color.into()),
|
color: Some(color.into()),
|
||||||
|
|
@ -160,7 +160,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(false).component;
|
||||||
widget::container::Style {
|
widget::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()),
|
||||||
|
|
|
||||||
|
|
@ -825,7 +825,7 @@ where
|
||||||
let scrollbar_color = if pressed {
|
let scrollbar_color = if pressed {
|
||||||
// pressed_state_color, 0.5
|
// pressed_state_color, 0.5
|
||||||
cosmic_theme
|
cosmic_theme
|
||||||
.background
|
.background(false)
|
||||||
.component
|
.component
|
||||||
.pressed
|
.pressed
|
||||||
.without_alpha()
|
.without_alpha()
|
||||||
|
|
@ -834,7 +834,7 @@ where
|
||||||
} else if hover {
|
} else if hover {
|
||||||
// hover_state_color, 0.2
|
// hover_state_color, 0.2
|
||||||
cosmic_theme
|
cosmic_theme
|
||||||
.background
|
.background(false)
|
||||||
.component
|
.component
|
||||||
.hover
|
.hover
|
||||||
.without_alpha()
|
.without_alpha()
|
||||||
|
|
@ -921,7 +921,7 @@ where
|
||||||
let scrollbar_color = if pressed {
|
let scrollbar_color = if pressed {
|
||||||
// pressed_state_color, 0.5
|
// pressed_state_color, 0.5
|
||||||
cosmic_theme
|
cosmic_theme
|
||||||
.background
|
.background(false)
|
||||||
.component
|
.component
|
||||||
.pressed
|
.pressed
|
||||||
.without_alpha()
|
.without_alpha()
|
||||||
|
|
@ -930,7 +930,7 @@ where
|
||||||
} else if hover {
|
} else if hover {
|
||||||
// hover_state_color, 0.2
|
// hover_state_color, 0.2
|
||||||
cosmic_theme
|
cosmic_theme
|
||||||
.background
|
.background(false)
|
||||||
.component
|
.component
|
||||||
.hover
|
.hover
|
||||||
.without_alpha()
|
.without_alpha()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue