fix: applet & cosmic-sctk example
This commit is contained in:
parent
e279566481
commit
3245ff1b0e
2 changed files with 2 additions and 14 deletions
|
|
@ -307,17 +307,6 @@ impl Application for Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !(self.is_condensed() && nav_bar_toggled) {
|
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)
|
let secondary = button(ButtonTheme::Secondary)
|
||||||
.text("Secondary")
|
.text("Secondary")
|
||||||
.on_press(Message::ButtonPressed);
|
.on_press(Message::ButtonPressed);
|
||||||
|
|
@ -329,7 +318,6 @@ impl Application for Window {
|
||||||
};
|
};
|
||||||
let content: Element<_> = settings::view_column(vec![
|
let content: Element<_> = settings::view_column(vec![
|
||||||
settings::view_section("Debug")
|
settings::view_section("Debug")
|
||||||
.add(settings::item("Debug theme", choose_theme))
|
|
||||||
.add(settings::item(
|
.add(settings::item(
|
||||||
"Debug layout",
|
"Debug layout",
|
||||||
toggler(String::from("Debug layout"), self.debug, Message::Debug),
|
toggler(String::from("Debug layout"), self.debug, Message::Debug),
|
||||||
|
|
@ -418,7 +406,7 @@ impl Application for Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn theme(&self) -> Theme {
|
fn theme(&self) -> Theme {
|
||||||
self.theme
|
self.theme.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn close_requested(&self, id: SurfaceIdWrapper) -> Self::Message {
|
fn close_requested(&self, id: SurfaceIdWrapper) -> Self::Message {
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ impl CosmicAppletHelper {
|
||||||
|
|
||||||
Container::<Message, Renderer>::new(Container::<Message, Renderer>::new(content).style(
|
Container::<Message, Renderer>::new(Container::<Message, Renderer>::new(content).style(
|
||||||
crate::theme::Container::Custom(|theme| Appearance {
|
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()),
|
background: Some(Color::from(theme.cosmic().background.base).into()),
|
||||||
border_radius: 12.0,
|
border_radius: 12.0,
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue