On Thu, 24 Mar 2022 16:53:42 GMT, Harshitha Onkar <d...@openjdk.java.net> wrote:

>>> 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.

I guess using "color close to selection background color" seems wrong to 
me...either we need to use "blue" as used in native Numbers app...or if we need 
to use system color, then maybe use the accent color (as defined in System 
Preference) as focus ring color [ there's another Apple bug 
[JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243) of JDK not 
following accent color for focus ring for some widgets]...

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

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

Reply via email to