On Mon, 5 Jan 2026 07:07:28 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> Check/radiobutton icon are not aligned properly in RTL. `WindowsMenuItemUI 
>> `uses `MenuItemLayoutHelper.layoutMenuItem` to do the layout which calls 
>> `doRTLColumnLayout `which calculates x positions in `calcXPositionsRTL `and 
>> then again aligns in `alignRects`. However, since in Windows historically 
>> radiobutton/check icon was not drawn or drawn below the menuitem image icon 
>> (since image icon and check icon was drawn in the same layout space and not 
>> separately) the aligned x position of check icons returned from 
>> `MenuItemLayoutHelper` was not correct but since `MenuItemLayoutHelper` 
>> alignment is used in other L&Fs also so we need to realign it in windows 
>> specific class i.e in WindowsIconFactory in paintIcon
>> 
>> Before fix
>> 
>> <img width="425" height="646" alt="image" 
>> src="https://github.com/user-attachments/assets/6aac649d-b099-4e11-ba9a-83c623034287";
>>  />
>> 
>> After fix
>> 
>> <img width="430" height="641" alt="image" 
>> src="https://github.com/user-attachments/assets/e0ea7e3e-d6cb-44a6-aa4f-78435f85d6fb";
>>  />
>
> Prasanta Sadhukhan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Use menuItem var

Although the if/else branches look strange, it works. I don't see a clear way 
to clean up and condense the conditionals so lgtm unless someone else has an 
idea.

Also I guess this Copyright year needs to be updated to 2026 now as well.

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

Marked as reviewed by dnguyen (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28889#pullrequestreview-3663417638
PR Comment: https://git.openjdk.org/jdk/pull/28889#issuecomment-3752341607

Reply via email to