Approved.
-phil
On 12/3/19, 11:46 AM, Sergey Bylokhov wrote:
On 12/3/19 12:21 am, Prasanta Sadhukhan wrote:
Fix looks ok to me but if dark mode is not being supported, why do we
need to update the test to work on dark mode? I think we need to have
some test to check if jdk returns unsupportedexception or something
similar for dark mode for now.
An update of the test is not strictly related to the fix, the change
relaxed the checks
which caused test to fail on my default config when DarkMode is
used(and pass on LightMode),
but it also might fail on LightMode if some non default theme is used.
Note that after this fix the dark mode(if set as an appearance in the
macOS) in some way will be "supported".
I mean currently DarkMode as a macOS appearance is unsupported because
the Aqua uses dark appearance
which does not work properly and some tests fail, after the fix Aqua
will use light appearance and
we could pass all related tests
(actually the whole fix is a workaround for
https://bugs.openjdk.java.net/browse/JDK-8228555)
Regards
Prasanta
On 27-Sep-19 6:08 AM, Sergey Bylokhov wrote:
Hello.
Please review the fix for JDK 14.
Bug: https://bugs.openjdk.java.net/browse/JDK-8231438
Fix: http://cr.openjdk.java.net/~serb/8231438/webrev.01
In jdk13 we started to use SDK 10.14 to build JDK, which
automatically opt-in support of dark mode:
--------------
"The system assumes that apps linked against the macOS 10.14 or
later SDK support both light and dark appearances"
https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app?language=objc
--------------
Unfortunately we dark mode still unsupported by the AWT/Swing,
because of:
- JavaRuntimeSupport Framework which is used by the Aqua L&F to
draw the "native"
appearance does not provide "dark mode" appearance, the bug is
filed to Apple.
https://bugs.openjdk.java.net/browse/JDK-8228555
- In a few places, we mix the "native" colors used by the system
and default colors
used by the Swing. For example, we may use a transparent white
selection "native"
color which is invisible on top of white text fields.
While the bugs above are not fixed we may opt-out the dark mode:
-------------
Supporting Dark Mode is strongly encouraged. Use the
NSRequiresAquaSystemAppearance key to opt out temporarily only while
you work on improvements to your app's Dark Mode support. If you do
not plan to support a dark appearance at all, apply a light
appearance to your entire app, as described in Assign a Specific
Appearance to Your App.
https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app?language=objc
-------------
I tried to disable it via plist.info but it does not work for "java
-jar" case, so I disabled it in the code
Some constants in one test were updated to work on dark and light
mode, but an updated test still reproduce the initial bug.