mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 04:54:45 +00:00
Preferences: the settings filter builds without a clippy warning on macOS
Squashed from #6235 onto main.
This commit is contained in:
@@ -57,10 +57,12 @@ pub(crate) struct Setting {
|
||||
/// preferences, each category's in the order the dialog lists them.
|
||||
fn settings() -> impl Iterator<Item = Setting> {
|
||||
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 =
|
||||
|
||||
Reference in New Issue
Block a user