RFR: 4130823: Not painting focus when the radio button has only icon [v3]

Karl T duke at openjdk.org
Thu Apr 6 23:39:44 UTC 2023


On Thu, 6 Apr 2023 07:01:15 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Although the issue here is asking about not painting focus when it has icon, however it seems Windows does not draw focus rect for radiobutton at all so instead of closing this as "Not an issue" it is made to not draw the focusrect even when there is text
>> 
>> This is what can be seen in windows system setting
>> 
>> ![systemsetting-nofocusrect](https://user-images.githubusercontent.com/43534309/227118784-97d6231d-beb4-4fc9-b760-c47e95817592.png)
>> 
>> and notepad
>> 
>> ![notepad-nofocus](https://user-images.githubusercontent.com/43534309/227118824-9d02329f-396d-43b3-aa68-927009a1bd57.png)
>> 
>> We have currently
>> 
>> ![beforefix-dashrect](https://user-images.githubusercontent.com/43534309/227119231-19feb2fd-203b-48a2-9e59-62ab63b51ccc.png)
>> 
>> 
>> and after fix
>> 
>> ![afterfix-nodashrect](https://user-images.githubusercontent.com/43534309/227119263-09be94e2-c6cc-4d7b-9449-a860aabca572.png)
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Test added

👎 👎 👎 

This is a bad idea IMHO.
If you remove focus rect from radiobutton and checkbox, **how can the user see where the focus is**? He can not!

And why removing focus rect only for radiobutton and checkbox, but not for button, slider, list, tree, table, etc?
There are a lot of components that show focus rect. It makes no sense to remove it from one component, but not from others.


>... however it seems Windows does not draw focus rect for radiobutton at all ...

This is not true.

Windows 11 Explorer file properties:

![grafik](https://user-images.githubusercontent.com/5604048/230511043-e177fad2-f439-4f66-80d2-12124252a866.png)

Windows 11 System settings (the rounded rectangle is the focus indicator; it is hidden by default, but shown when pressing TAB key):

![grafik](https://user-images.githubusercontent.com/5604048/230511293-a4a3f76c-1ded-4f93-8218-c43a65b5655d.png)

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

PR Comment: https://git.openjdk.org/jdk/pull/13153#issuecomment-1499758791



More information about the client-libs-dev mailing list