You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// center because the real icon may be smaller than dimension in iconRect
int y = iconRect.y + centerOffset( iconRect.height, icon.getIconHeight() );
// paint
icon.paintIcon( menuItem, g, iconRect.x, y );
but I think you should also center dem horizontally:
// center because the real icon may be smaller than dimension in iconRect
int x = iconRect.x + centerOffset( iconRect.width, icon.getIconWidth() );
int y = iconRect.y + centerOffset( iconRect.height, icon.getIconHeight() );
// paint
icon.paintIcon( menuItem, g, x, y );
this is what I did for the second screenshot
The text was updated successfully, but these errors were encountered:
When using some icons with different widths in JMenuItems, they appear left aligned (see the play icon and the cross at the bottom) :
imho they should be centered to make it look more consistent:
I found the place where you render the icons: https://github.com/JFormDesigner/FlatLaf/blob/main/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemRenderer.java#L454
you already center the icons vertically:
but I think you should also center dem horizontally:
this is what I did for the second screenshot
The text was updated successfully, but these errors were encountered: