fix: applet & cosmic-sctk example

This commit is contained in:
Ashley Wulber 2023-02-27 19:33:04 -05:00 committed by Jeremy Soller
parent e279566481
commit 3245ff1b0e
2 changed files with 2 additions and 14 deletions

View file

@ -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 {

View file

@ -131,7 +131,7 @@ impl CosmicAppletHelper {
Container::<Message, Renderer>::new(Container::<Message, Renderer>::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,