From 30b334693fce67de297bec407faeec348956dc5f Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Fri, 3 Jul 2026 13:10:15 +0200 Subject: [PATCH] fix: adapt to cosmic-theme background(transparent) accessor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Leyoda 2026 – GPLv3 --- src/menu.rs | 4 ++-- src/text_box.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/menu.rs b/src/menu.rs index 7ae1fd6..629cee3 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -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()), diff --git a/src/text_box.rs b/src/text_box.rs index 311570b..36d35ef 100644 --- a/src/text_box.rs +++ b/src/text_box.rs @@ -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()