On Fri, 8 Apr 2022 07:55:57 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> @prrace @prsadhuk >> The issue with the system color returned by **keyboardFocusIndicatorColor** >> mentioned above, persists on macOS 12.3 as well. > > "accentColor" is swift property so not usable for jdk but you can use > "controlAccentColor" which seems to work with 10.15 and 12.1 as per my > limited testing. > You need to use @available check though.. > Even though it may not work for version lesser than 10.14, I guess it's ok as > those versions are more or less obsolete and we will not be worse off than > where we are now... > While you are at it, please consider renaming this function as told. @prsadhuk Update PR with the recommended changes. The "controlAccentColor" changes works as expected in Mac 12.3 as well. One thing that I wanted to clarify with the fix is - the focus ring color ("Focus.ring") is used at two other places AquaButtonUI and AquaFocus (for focused icon). With the current fix I'm setting **KEYBOARD_FOCUS_COLOR** as below - <img width="1092" alt="image" src="https://user-images.githubusercontent.com/95945681/162673487-26006ca1-9373-4fe7-8f0b-f99cd47b2eb7.png"> Before and After images of focused icon - **Before** <img width="185" alt="image" src="https://user-images.githubusercontent.com/95945681/162674337-ebbfea9f-e753-4b4c-a624-7cef5b8d8c1b.png"> **After (focus around icon slightly darker - focus ring color obtained from controlAccentColor property)** <img width="198" alt="image" src="https://user-images.githubusercontent.com/95945681/162674444-b917de71-8e91-472e-a8f0-da48df0a43a5.png"> Please let me know in case I need to add a NEW color (as shown below) instead of reusing the KEYBOARD_FOCUS_COLOR if the color effects on focused icon/ button doesn't look correct. <img width="1099" alt="image" src="https://user-images.githubusercontent.com/95945681/162675955-efd9c77f-6d7b-41e7-803a-50f49154fba5.png"> ------------- PR: https://git.openjdk.java.net/jdk/pull/7768