FlatLaf icon indicating copy to clipboard operation
FlatLaf copied to clipboard

List: rounded selection

Open DevCharly opened this issue 3 years ago • 0 comments

This PR enables using "rounded" selection for list selection.

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.

Examples

grafik

UI properties for above screenshot (see Application properties files):

List.selectionInsets = 0,1,0,1
List.selectionArc = 6

The problem with this is that there is no gap between the top border and the first selected item:

grafik

To fix this, a empty border can be used instead of selectionInsets:

grafik

List.border = 1,1,1,1
List.selectionArc = 6

Layout orientation

Works also for layout orientations VERTICAL_WRAP and HORIZONTAL_WRAP:

grafik

List.selectionInsets = 0,1,0,1
List.selectionArc = 6

With zero selectionInsets it looks like this:

grafik

List.border = 1,1,1,1
List.selectionArc = 6

DevCharly avatar Jun 04 '22 12:06 DevCharly