RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8]

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Fri Apr 8 07:59:43 UTC 2022


On Fri, 8 Apr 2022 00:36:54 GMT, Harshitha Onkar <duke at openjdk.java.net> wrote:

>> Following type properties where checked for cellFocusRing color
>> 
>> - [alternateSelectedControlColor](https://developer.apple.com/documentation/appkit/nscolor/1533135-alternateselectedcontrolcolor) 
>> **Issue:** Doesn't follow accent color in macos 10.15 and deprecated property.
>> 
>> - [selectedContentBackgroundColor](https://developer.apple.com/documentation/appkit/nscolor/2998830-selectedcontentbackgroundcolor)
>> **Issue:** New property corresponding to **alternateSelectedControlColor** (deprecated). Causes build issues as the property is supported on macOS 10.14+ and the macOS deployment target version is 10.12 for jdk.
>> 
>> -  [controlAccentColor](https://developer.apple.com/documentation/appkit/nscolor/3000782-controlaccentcolor) 
>> **Issue:** Causes build issues due to version compatibility, property supported on only macOS 10.14+
>> 
>> - [accentColor](https://developer.apple.com/documentation/swiftui/color/accentcolor) 
>> **Issue:** Property supported on only macOS 10.15+, compatibility and run time issues.
>> 
>> - [keyboardfocusindicatorcolor](https://developer.apple.com/documentation/appkit/nscolor/1532031-keyboardfocusindicatorcolor) 
>> **Issue:** Works well for most of the scenarios (including on-the-fly changes) and follows the accent color changes except when we start the application with accent color set to Graphite and then change accent color on-the-fly (as mentioned above). The cell focus ring remains gray. The issue seems to be with the system color returned by the type-property "**keyboardfocusindicatorcolor**" under this setting.
>
> @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..
While you are it, please consider renaming this function as told.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7768



More information about the client-libs-dev mailing list