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

Harshitha Onkar duke at openjdk.java.net
Thu Mar 24 16:57:50 UTC 2022


On Thu, 17 Mar 2022 18:08:40 GMT, Harshitha Onkar <duke at openjdk.java.net> wrote:

>> There are two different approaches that we can take at this point.
>> 
>> 1. Do we go forward with the present changes? (hue and saturation offset, brightness set to 100%) 
>> 2. Keep a common cell focus ring color - Blue as observed in few native apps (Numbers App). In this scenario we keep the cell focus ring color set to blue when selection background color is NOT blue and return a different color when selection background is Blue.
>> 
>> Trying to find the best solution that takes into account native L&F and present Aqua L&F implementations.
>
>> Probably to get an identical focus ring, we need to use [NSSetFocusRingStyle](https://developer.apple.com/documentation/appkit/1473702-nssetfocusringstyle?language=objc)
> 
> This is more about placement of the focus ring (and available only from macOS 10.1+ versions) and would require native code changes. Might not be an ideal solution in this context.

Following was another suggestion and if we could use the code to produce brighter focus ring color
[Github Link](https://github.com/openjdk/jdk/commit/2f16ca0f59892fead80b209f7819bdbdb713329a) 

Since the code uses a fixed value for minBrightnessDifference (which determines the returned color),  it did return brighter shade of the background, but it was not prominent/visible against the selection background color for all colors.
The same is true with using Color's brighter() and darker() methods to obtain the Cell Focus Ring color.

The idea behind the present solution is to obtain a cell focus ring color that is not just a brighter shade of selection background but to offset the hue and saturation such that it is prominent but at the same time a color close to the selection background color.

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

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



More information about the client-libs-dev mailing list