JDK-8228555 : [macos] [dark_mode] The text on the various components is not visible on DarkMode
Type:Bug
Component:client-libs
Sub-Component:javax.swing
Affected Version:8,11,13,14,15
Priority:P2
Status:Closed
Resolution:Cannot Reproduce
OS:os_x
CPU:generic
Submitted:2019-07-23
Updated:2020-12-08
Resolved:2020-12-08
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
To reproduce the problem the next example can be used:
https://bugs.openjdk.java.net/browse/JDK-8227836
See screenshot of the result
Comments
Apple confirmed they are working on this issue.
Apple bugID: FB6798883: The JavaRuntimeSupport.framework does not work properly in the dark mode
17-03-2020
still reproducible on Beta macOS 10.15.3
27-01-2020
[~serb] is it still reproducible on the latest macOS build?
24-01-2020
still reproducible
03-12-2019
[~serb] does it affect Catalina 10.15.2 Beta (19C46a) ?
02-12-2019
[~serb] this list https://bugs.openjdk.java.net/secure/attachment/85149/fail.txt needs to be mapped on CRs unless all of them caused by "The text on the various components is not visible on DarkMode" Issue
25-11-2019
total 47 tests failing due to DARK mode
See attached
https://bugs.openjdk.java.net/secure/attachment/85149/fail.txt
24-10-2019
This mode might be supported in case (1) SQE test cycle completed; (2) all critical issues including tck-red bugs fixed on java side (no one so far); (3) Apple's bugs fixed on macOS side (like this FB6798883: The JavaRuntimeSupport.framework does not work properly in the dark mode ),
so removing tck-red label.
04-10-2019
Reproduced on macOS Mojave in DarkMode as well.
27-09-2019
We can try to opt out the dark mode, according to the doc it should be possible:
https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app?language=objc
But the change in the plist.info is ignored, will try to do the same in the code itself.
24-09-2019
Just found another place where we mix colors from the different modes: JDK-8231386. Looks like we should either fully support the dark mode and its native colors or we need to ignore all system colors and use some hardcoded one.
24-09-2019
In macOS, there is an API which reports the colors currently used by the system, but when we actually draw something via JRS the color used as the background color of the component is different.
24-09-2019
> since the system reports one dark background color but use white color as a background.
Can you explain that in more depth ? It sounds contradictory, what do you mean by "reports" versus "uses" ?
24-09-2019
We cannot do exactly what we did in JDK-8226964 since the system reports one dark background color but use white color as a background.
We can revert the "change" of the font color(caused by the SDK upgrade), and ignore the system configuration and always return black as it was in jdk12, or probably freeze all colors to prevent mix of different styles(white/dark) .
24-09-2019
Can we do something similar to what we had to do with GTK3 ?
https://bugs.openjdk.java.net/browse/JDK-8226964
22-09-2019
FB6798883: The JavaRuntimeSupport.framework does not work properly in the dark mode
06-08-2019
The bug is reproduced on the macOS 10.15 which is still in beta state and required a fix in the JRS, the bug was submitted to the Apple.
01-08-2019
It works on jdk12 because of the crossing of two similar bugs in JDK:
- The color of the text is incorrect in dark mode(black instead of white).
- The JRS does not support the dark mode so the white button background is drawn.
In jdk13 we start to use correct text color, but the JRS still return incorrect background, as a result, the text is invisible.
I have filed the bug to the Apple against JRS, but we have a dilemma here when this bug will be fixed the jdk12(and below) will be broken as it will use the black text on the dark background.
24-07-2019
Only 13 and 14 are affected, I guess due to SDK upgrade.