FlatLaf
FlatLaf copied to clipboard
Menus: rounded selection
This PR enables using "rounded" selection for menu items.
It also enables using different selection colors for top-level JMenu
s.
This is not yet used in any theme, but intended to be used for macOS themes (see PR #533) and future Windows 11 style themes.
Perhaps this should also be used for existing themes to make menus look more beautiful. Any opinions?
Example
(left image shows rounded selection; right image shows default look)
UI properties for above screenshot (see Application properties files):
# make menu item margins larger (default is 3,6,3,6)
@menuItemMargin = 3,9,3,9
MenuBar.selectionBackground = darken(@menuBackground,15%,derived)
MenuBar.selectionForeground = @foreground
MenuBar.selectionInsets = 1,0,1,0
MenuBar.selectionEmbeddedInsets = 3,0,3,0
MenuItem.selectionInsets = 0,3,0,3
MenuItem.selectionArc = 8
Perhaps this should also be used for existing themes to make menus look more beautiful. Any opinions?
Awesome work, looks great to my eyes, even with non-macOS / non-Win11 UIs. But I am not a UI / UX expert :-)