From 2006ebe447ba4ee38dab24998a3510c0ea01b029 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 27 Sep 2024 09:13:38 -0600 Subject: [PATCH] Fix disabled icon button and menu item styles, fixes #621 --- src/theme/style/button.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/theme/style/button.rs b/src/theme/style/button.rs index 119a2609..704ef8c4 100644 --- a/src/theme/style/button.rs +++ b/src/theme/style/button.rs @@ -80,8 +80,10 @@ pub fn appearance( } } - let (background, _text, _icon) = color(&cosmic.icon_button); + let (background, text, icon) = color(&cosmic.icon_button); appearance.background = Some(Background::Color(background)); + appearance.text_color = text; + appearance.icon_color = icon; } Button::Image => { @@ -129,11 +131,10 @@ pub fn appearance( appearance.text_color = None; } Button::MenuItem => { - let (background, _, _) = color(&cosmic.background.component); + let (background, text, icon) = color(&cosmic.background.component); appearance.background = Some(Background::Color(background)); - - appearance.icon_color = Some(cosmic.background.on.into()); - appearance.text_color = Some(cosmic.background.on.into()); + appearance.icon_color = icon; + appearance.text_color = text; corner_radii = &cosmic.corner_radii.radius_s; } }