From 3245ff1b0e7d11f1932fc74e598527ed67cddac9 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Mon, 27 Feb 2023 19:33:04 -0500 Subject: [PATCH] fix: applet & cosmic-sctk example --- examples/cosmic-sctk/src/window.rs | 14 +------------- src/applet/mod.rs | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/examples/cosmic-sctk/src/window.rs b/examples/cosmic-sctk/src/window.rs index 38d7f650..525bcbb0 100644 --- a/examples/cosmic-sctk/src/window.rs +++ b/examples/cosmic-sctk/src/window.rs @@ -307,17 +307,6 @@ impl Application for Window { } if !(self.is_condensed() && nav_bar_toggled) { - let choose_theme = [Theme::Light, Theme::Dark].iter().fold( - row![].spacing(10).align_items(Alignment::Center), - |row, theme| { - row.push(radio( - format!("{:?}", theme), - *theme, - Some(self.theme), - Message::ThemeChanged, - )) - }, - ); let secondary = button(ButtonTheme::Secondary) .text("Secondary") .on_press(Message::ButtonPressed); @@ -329,7 +318,6 @@ impl Application for Window { }; let content: Element<_> = settings::view_column(vec![ settings::view_section("Debug") - .add(settings::item("Debug theme", choose_theme)) .add(settings::item( "Debug layout", toggler(String::from("Debug layout"), self.debug, Message::Debug), @@ -418,7 +406,7 @@ impl Application for Window { } fn theme(&self) -> Theme { - self.theme + self.theme.clone() } fn close_requested(&self, id: SurfaceIdWrapper) -> Self::Message { diff --git a/src/applet/mod.rs b/src/applet/mod.rs index 6885e59d..ed4cc7a0 100644 --- a/src/applet/mod.rs +++ b/src/applet/mod.rs @@ -131,7 +131,7 @@ impl CosmicAppletHelper { Container::::new(Container::::new(content).style( crate::theme::Container::Custom(|theme| Appearance { - text_color: Some(theme.cosmic().on.into()), + text_color: Some(theme.cosmic().background.on.into()), background: Some(Color::from(theme.cosmic().background.base).into()), border_radius: 12.0, border_width: 0.0,