RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v33]

Prasanta Sadhukhan psadhukhan at openjdk.org
Mon Jul 14 05:20:04 UTC 2025


On Fri, 11 Jul 2025 18:08:46 GMT, Phil Race <prr at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Adjust offset for varying size imageicon
>
> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java line 947:
> 
>> 945:                     } else {
>> 946:                         icon.paintIcon(c, g, x + 6*OFFSET,
>> 947:                                 y + OFFSET);
> 
> Where did the magic multiplier of 6 come from ?

Nothing in particular, it's only for alignment..Since OFFSET here is a magic number and didn't have access to any of MenuLayoutHelper "gap" variables in this class so had to rely on this magic multiplier for aesthetic alignment.. 
But anyways modified now to not use magic number..

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23324#discussion_r2203864999


More information about the client-libs-dev mailing list