From de77a35bdac544e186546c9daefe2f023f07d4f7 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 28 Sep 2021 18:45:21 +0300 Subject: macOS: Disable unused macOS 10.14 color code --- src/macos.m | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/macos.m b/src/macos.m index 3106d9e3..54ca0e07 100644 --- a/src/macos.m +++ b/src/macos.m @@ -689,10 +689,15 @@ void showPopupMenu_MacOS(iWidget *source, iInt2 windowCoord, const iMenuItem *it } iColor systemAccent_Color(void) { - NSColor *accent = [[NSColor controlAccentColor] colorUsingColorSpace: - [NSColorSpace deviceRGBColorSpace]]; - return (iColor){ iClamp([accent redComponent] * 255, 0, 255), - iClamp([accent greenComponent] * 255, 0, 255), - iClamp([accent blueComponent] * 255, 0, 255), - 255 }; +#if 0 + if (@available(macOS 10.14, *)) { + NSColor *accent = [[NSColor controlAccentColor] colorUsingColorSpace: + [NSColorSpace deviceRGBColorSpace]]; + return (iColor){ iClamp([accent redComponent] * 255, 0, 255), + iClamp([accent greenComponent] * 255, 0, 255), + iClamp([accent blueComponent] * 255, 0, 255), + 255 }; + } +#endif + return (iColor){ 255, 255, 255, 255 }; } -- cgit v1.2.3