diff --git a/crates/ui-egui/src/prefs_dialog.rs b/crates/ui-egui/src/prefs_dialog.rs index b64d54e67..733aaf200 100644 --- a/crates/ui-egui/src/prefs_dialog.rs +++ b/crates/ui-egui/src/prefs_dialog.rs @@ -57,10 +57,12 @@ pub(crate) struct Setting { /// preferences, each category's in the order the dialog lists them. fn settings() -> impl Iterator { let ui_fields = UI_FIELDS.iter().map(|&(key, category, label)| Setting { key, category, section: "", label }); + const SYSTEM_TITLE_BAR: bool = cfg!(all(not(target_arch = "wasm32"), not(target_os = "macos"))); + const DISPLAY_SERVER_CHOICE: bool = cfg!(target_os = "linux"); let shown = |key: &str| match key { - "systemTitleBar" => cfg!(all(not(target_arch = "wasm32"), not(target_os = "macos"))), + "systemTitleBar" => SYSTEM_TITLE_BAR, "appTitleBar" => APP_TITLE_BAR_SHOWN, - "linuxDisplayServer" => cfg!(target_os = "linux"), + "linuxDisplayServer" => DISPLAY_SERVER_CHOICE, _ => true, }; let prefs =