fix: example
This commit is contained in:
parent
a618c1b94a
commit
85f816f35b
1 changed files with 7 additions and 6 deletions
|
|
@ -10,7 +10,7 @@ use cosmic::{
|
||||||
window::{self, close, drag, minimize, toggle_maximize},
|
window::{self, close, drag, minimize, toggle_maximize},
|
||||||
},
|
},
|
||||||
keyboard_nav,
|
keyboard_nav,
|
||||||
theme::{self, CosmicTheme, CosmicThemeCss, Theme},
|
theme::{self, CosmicTheme, Theme},
|
||||||
widget::{
|
widget::{
|
||||||
header_bar, icon, list, nav_bar, nav_bar_toggle, scrollable, segmented_button, settings,
|
header_bar, icon, list, nav_bar, nav_bar_toggle, scrollable, segmented_button, settings,
|
||||||
warning, IconSource,
|
warning, IconSource,
|
||||||
|
|
@ -389,16 +389,17 @@ impl Application for Window {
|
||||||
Subscription::batch(vec![
|
Subscription::batch(vec![
|
||||||
window_break.map(|_| Message::CondensedViewToggle),
|
window_break.map(|_| Message::CondensedViewToggle),
|
||||||
keyboard_nav::subscription().map(Message::KeyboardNav),
|
keyboard_nav::subscription().map(Message::KeyboardNav),
|
||||||
config_subscription::<_, CosmicThemeCss>(0, Cow::from("com.system76.CosmicTheme"), 1)
|
config_subscription::<_, CosmicTheme>(0, Cow::from("com.system76.CosmicTheme"), 1).map(
|
||||||
.map(|(_, update)| match update {
|
|(_, update)| match update {
|
||||||
Ok(t) => Message::SystemTheme(t.into_srgba()),
|
Ok(t) => Message::SystemTheme(t),
|
||||||
Err((errors, t)) => {
|
Err((errors, t)) => {
|
||||||
for error in errors {
|
for error in errors {
|
||||||
error!("{:?}", error);
|
error!("{:?}", error);
|
||||||
}
|
}
|
||||||
Message::SystemTheme(t.into_srgba())
|
Message::SystemTheme(t)
|
||||||
}
|
}
|
||||||
}),
|
},
|
||||||
|
),
|
||||||
self.timeline
|
self.timeline
|
||||||
.borrow()
|
.borrow()
|
||||||
.as_subscription()
|
.as_subscription()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue