dialog: preserve show details setting
This commit is contained in:
parent
5fd643b166
commit
4f0c5c1ec1
2 changed files with 54 additions and 10 deletions
|
|
@ -164,6 +164,7 @@ impl State {
|
|||
#[serde(default)]
|
||||
pub struct Config {
|
||||
pub app_theme: AppTheme,
|
||||
pub dialog: DialogConfig,
|
||||
pub desktop: DesktopConfig,
|
||||
pub favorites: Vec<Favorite>,
|
||||
pub show_details: bool,
|
||||
|
|
@ -206,6 +207,7 @@ impl Default for Config {
|
|||
Self {
|
||||
app_theme: AppTheme::System,
|
||||
desktop: DesktopConfig::default(),
|
||||
dialog: DialogConfig::default(),
|
||||
favorites: vec![
|
||||
Favorite::Home,
|
||||
Favorite::Documents,
|
||||
|
|
@ -249,6 +251,18 @@ impl DesktopConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, CosmicConfigEntry, Deserialize, Serialize)]
|
||||
#[serde(default)]
|
||||
pub struct DialogConfig {
|
||||
pub show_details: bool,
|
||||
}
|
||||
|
||||
impl Default for DialogConfig {
|
||||
fn default() -> Self {
|
||||
Self { show_details: true }
|
||||
}
|
||||
}
|
||||
|
||||
/// Global and local [`crate::tab::Tab`] config.
|
||||
///
|
||||
/// [`TabConfig`] contains options that are passed to each instance of [`crate::tab::Tab`].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue