diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2024-03-28 13:52:50 +1100 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2024-03-28 13:52:50 +1100 |
commit | a66cd4c4882781beb6855edf043b054874e48f91 (patch) | |
tree | 1ff3aa23d27359bbe0244ec3632784d63dd4104c /cocoa/PlatCocoa.mm | |
parent | 6e28c96eb4ac81fba49dde0d11872c90ef971484 (diff) | |
download | scintilla-mirror-a66cd4c4882781beb6855edf043b054874e48f91.tar.gz |
Avoid use of NSUserDefaults which will soon require justification when used in applications
on the App Store.
Diffstat (limited to 'cocoa/PlatCocoa.mm')
-rw-r--r-- | cocoa/PlatCocoa.mm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index d97c9f08d..6eb12f4ad 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -2298,8 +2298,7 @@ ColourRGBA Platform::ChromeHighlight() { * Returns the currently set system font for the user. */ const char *Platform::DefaultFont() { - NSString *name = [[NSUserDefaults standardUserDefaults] stringForKey: @"NSFixedPitchFont"]; - return name.UTF8String; + return "Menlo-Regular"; } //-------------------------------------------------------------------------------------------------- @@ -2308,8 +2307,7 @@ const char *Platform::DefaultFont() { * Returns the currently set system font size for the user. */ int Platform::DefaultFontSize() { - return static_cast<int>([[NSUserDefaults standardUserDefaults] - integerForKey: @"NSFixedPitchFontSize"]); + return 11; } //-------------------------------------------------------------------------------------------------- @@ -2321,8 +2319,7 @@ int Platform::DefaultFontSize() { * @return time span in milliseconds */ unsigned int Platform::DoubleClickTime() { - float threshold = [[NSUserDefaults standardUserDefaults] floatForKey: - @"com.apple.mouse.doubleClickThreshold"]; + NSTimeInterval threshold = NSEvent.doubleClickInterval; if (threshold == 0) threshold = 0.5; return static_cast<unsigned int>(threshold * 1000.0); |