Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List: rounded selection #547

Closed
wants to merge 3 commits into from

Conversation

DevCharly
Copy link
Collaborator

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 DevCharly added this to the 3.0 milestone Jun 4, 2022
DevCharly added a commit that referenced this pull request Oct 30, 2022
# Conflicts:
#	flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatComponents2Test.java
@DevCharly
Copy link
Collaborator Author

The PR is merged. Don't know why GitHub did not recognize it.

@DevCharly DevCharly closed this Oct 30, 2022
@DevCharly DevCharly deleted the list-rounded-selection branch October 30, 2022 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant