On Wed, 29 Oct 2025 10:44:21 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> LEADING causes the text to appear before icon so need to account for it..
>> 
>> Before fix
>> 
>> <img width="302" height="188" alt="Image" 
>> src="https://github.com/user-attachments/assets/3c7dd877-da0a-44dd-8e1e-8486344b36da";
>>  />
>> 
>> After fix
>> 
>> <img width="196" height="120" alt="Image" 
>> src="https://github.com/user-attachments/assets/14aed6e1-2b42-4d10-9a4d-a4cc4f9f230a";
>>  />
>> 
>> Others are working as I can see "horizontalAlignment = LEFT..." and 
>> "horizontalAlignment=RIGHT" which uses LEFT and RIGHT horizontal text 
>> positioning
>> 
>> <img width="524" height="77" alt="image" 
>> src="https://github.com/user-attachments/assets/f2b5eb41-b48d-4187-bc55-1f1359142d4f";
>>  />
>
> Actually I have modified the PR to rectify layouting ensuring radiobutton 
> bullet/checkmark are drawn at dedicated position and doesn't interfere with 
> icon position for RTL too..Previous PR iteration was not taking into account 
> of this for RTL so if the menuitem was selected in RTL, it was not shown..

I just tested the latest version of the fix with the slightly modified test 
case (i added two extra menu items with 
`menuItem.setHorizontalTextPosition(SwingConstants.LEFT);`
and
`menuItem.setHorizontalTextPosition(SwingConstants.RIGHT);`
and it does not look exactly correct. Here's the screenshot:
<img width="331" height="511" alt="image" 
src="https://github.com/user-attachments/assets/8494241e-aefd-4259-bcb2-8b3cf2360d7d";
 />

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27968#discussion_r2475883606

Reply via email to