Add linux-theme-detection feature through mundy
This commit is contained in:
parent
ab7eb88951
commit
e92c87061d
8 changed files with 566 additions and 50 deletions
|
|
@ -25,6 +25,7 @@ pub use iced_futures as futures;
|
|||
pub use task::Task;
|
||||
pub use user_interface::UserInterface;
|
||||
|
||||
use crate::core::theme;
|
||||
use crate::core::widget;
|
||||
use crate::futures::futures::channel::oneshot;
|
||||
|
||||
|
|
@ -56,6 +57,9 @@ pub enum Action<T> {
|
|||
/// Run a system action.
|
||||
System(system::Action),
|
||||
|
||||
/// Change the default system theme mode of all windows.
|
||||
ChangeTheme(theme::Mode),
|
||||
|
||||
/// Recreate all user interfaces and redraw all windows.
|
||||
Reload,
|
||||
|
||||
|
|
@ -82,6 +86,7 @@ impl<T> Action<T> {
|
|||
Action::Clipboard(action) => Err(Action::Clipboard(action)),
|
||||
Action::Window(action) => Err(Action::Window(action)),
|
||||
Action::System(action) => Err(Action::System(action)),
|
||||
Action::ChangeTheme(mode) => Err(Action::ChangeTheme(mode)),
|
||||
Action::Reload => Err(Action::Reload),
|
||||
Action::Exit => Err(Action::Exit),
|
||||
}
|
||||
|
|
@ -106,6 +111,9 @@ where
|
|||
}
|
||||
Action::Window(_) => write!(f, "Action::Window"),
|
||||
Action::System(action) => write!(f, "Action::System({action:?})"),
|
||||
Action::ChangeTheme(mode) => {
|
||||
write!(f, "Action::ChangeTheme({mode:?})")
|
||||
}
|
||||
Action::Reload => write!(f, "Action::Reload"),
|
||||
Action::Exit => write!(f, "Action::Exit"),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue