refactor: add is_daemon setting
The app can request to be treated by iced as a daemon so it can perform cleanup when its main window is closed.
This commit is contained in:
parent
e3fabf7d12
commit
aaadf7199e
4 changed files with 9 additions and 4 deletions
|
|
@ -57,8 +57,11 @@ pub struct Settings {
|
|||
/// Whether the window should be transparent.
|
||||
pub(crate) transparent: bool,
|
||||
|
||||
/// Whether the application should exit when there are no open windows
|
||||
/// Whether the application window should close when the exit button is pressed
|
||||
pub(crate) exit_on_close: bool,
|
||||
|
||||
/// Whether the application should act as a daemon
|
||||
pub(crate) is_daemon: bool,
|
||||
}
|
||||
|
||||
impl Settings {
|
||||
|
|
@ -92,6 +95,7 @@ impl Default for Settings {
|
|||
theme: crate::theme::system_preference(),
|
||||
transparent: true,
|
||||
exit_on_close: true,
|
||||
is_daemon: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue