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

CheckBox: support styling indeterminate state of tri-state check boxes #936

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

DevCharly
Copy link
Collaborator

This PR enables full styling indeterminate state of tri-state check boxes (issue #919).
See check box icons in red rectangles (left is FlatLightLaf, right is FlatIntelliJLaf):

image

There are a lot of new UI properties to do this. See source code of FlatCheckBoxIcon in this PR.

Samples

Change blue border to gray:

CheckBox.icon.indeterminateBorderColor = $CheckBox.icon.borderColor

image

Also change blue indeterminate checkmark to gray:

CheckBox.icon.indeterminateBorderColor = $CheckBox.icon.borderColor
CheckBox.icon.indeterminateCheckmarkColor = $CheckBox.icon.disabledCheckmarkColor

image

Use white background for FlatIntelliJLaf:

CheckBox.icon[filled].indeterminateBackground = $CheckBox.icon.background
CheckBox.icon[filled].focusedIndeterminateBackground = $CheckBox.icon.background
CheckBox.icon[filled].indeterminateCheckmarkColor = $CheckBox.icon.checkmarkColor

image

Theme Editor

Above screenshots are made with FlatLaf Theme Editor.

image

@DevCharly DevCharly added this to the 3.6 milestone Dec 11, 2024
@DevCharly DevCharly merged commit a3a49ce into main Dec 18, 2024
8 checks passed
@DevCharly DevCharly deleted the checkbox-indeterminate-styling branch December 18, 2024 11:25
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.

1 participant