clInfoText wrong color in Mojave (patch included)
Original Reporter info from Mantis: Hansaplast
-
Reporter name: Hans Luijten
Original Reporter info from Mantis: Hansaplast
- Reporter name: Hans Luijten
Description:
The clInfoBk color is incorrect in Mojave when using Dark Theme.
In Dark Theme a light grey background is being displayed (with white text), which should be an almost black gray (also with white text). When looking in the code I found:
COLOR_INFOBK:
Result := ColorToNSColor(ColorToolTip);
Proposal: This could be (after testing Mojave and High Sierra):
COLOR_INFOBK:
Result := NSColor.windowBackgroundColor;
Patch (also attached):
Index: lcl/interfaces/cocoa/cocoawinapi.inc
===================================================================
--- lcl/interfaces/cocoa/cocoawinapi.inc (revision 59192)
+++ lcl/interfaces/cocoa/cocoawinapi.inc (working copy)
@@ -1599,7 +1599,7 @@
COLOR_3DLIGHT:
Result := NSColor.controlHighlightColor;// makes a more consistent result (a very light gray) than controlLightHighlightColor (which is white)
COLOR_INFOBK:
- Result := ColorToNSColor(ColorToolTip);
+ Result := NSColor.windowBackgroundColor;
else
Result := nil;
end;
Steps to reproduce:
Set a hint for a control, compile, run in Light Theme; all OK.
Run again in Dark Theme: hint background light grey with unreadable white text.
Proposed
After patch: hint window background dark gray in Dark Theme and Light Grey in Light Theme and High Sierra, matching Apple applications.
Additional information:
Lazarus 2.1.0 r59192 FPC 3.0.4 x86_64-darwin-cocoa (alpha)
Mantis conversion info:
- Mantis ID: 34360
- OS: macOS
- OS Build: 10.14
- Build: r59192
- Platform: Mac
- Version: 1.8.5 (SVN)
- Fixed in revision: 61055 (#aea75fde)
- Monitored by: » Hansaplast (Hans Luijten)