From 2b16d4e002d9aa1f87f410a2c31f62e33314dbaf Mon Sep 17 00:00:00 2001 From: Grublady Date: Thu, 1 Aug 2024 21:49:11 -0400 Subject: [PATCH] Use windowBackgroundColor instead of controlColor for macOS system base color Per Apple Developer Documentation: windowBackgroundColor: "The color to use for the window background." controlColor: "The color to use for the flat surfaces of a control." Godot's base_color more closely corresponds to windowBackgroundColor. In some cases, controlColor may even return values that are not appropriate for use as a base color. --- platform/macos/display_server_macos.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index 556c4c966ef..67034c9abb3 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -903,7 +903,7 @@ Color DisplayServerMacOS::get_base_color() const { __block NSColor *color = nullptr; if (@available(macOS 11.0, *)) { [NSApp.effectiveAppearance performAsCurrentDrawingAppearance:^{ - color = [[NSColor controlColor] colorUsingColorSpace:[NSColorSpace genericRGBColorSpace]]; + color = [[NSColor windowBackgroundColor] colorUsingColorSpace:[NSColorSpace genericRGBColorSpace]]; }]; } else { NSAppearance *saved_appearance = [NSAppearance currentAppearance];