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

JToggleButton border #86

Closed
lgoix opened this issue Apr 20, 2020 · 3 comments
Closed

JToggleButton border #86

lgoix opened this issue Apr 20, 2020 · 3 comments
Milestone

Comments

@lgoix
Copy link

lgoix commented Apr 20, 2020

I'm using the Material Darker Contrast Theme, with 2 JToggleButton side-by-side, it is hard to see which one is currently selected

image

Can I set a border that is the color of the selected background ?

When I specify the buttons to be a "tab", the unselected button has no background, it is hard to see it exists. But it is easy to see which one is selected.

button.putClientProperty( "JButton.buttonType", "tab" );

image

Can we add a border to the JButton of type = tab ?

@lgoix lgoix changed the title JToggleButton JToggleButton border Apr 20, 2020
DevCharly added a commit that referenced this issue Apr 21, 2020
…emes and foreground in Darcula and One Dark themes (issue #86)
@DevCharly DevCharly added this to the 0.32 milestone Apr 22, 2020
@DevCharly
Copy link
Collaborator

@lgoix because IntelliJ IDEA does not use plain toggle buttons, theme authors usually do not specify or test them.

So I've fixed them in FlatLaf 0.32.

New Material Darker Contrast toggle buttons:

image

There is now also a new FlatLaf IntelliJ Themes Pack that bundles all themes that the FlatLaf Demo uses into a JAR and provides Java classes to use them. This also makes it easier to update the theme because it is no longer necessary to download a .theme.json file.

If you don't want use the themes pack, please update Material Darker Contrast.theme.json to latest version because there are some improvements.

@DevCharly
Copy link
Collaborator

Regarding border on "tab" style toggle buttons:
yes you can replace it. The "underline" is not painted in the default border.

Its probably a good idea to extend FlatButtonBorder (for minimum button width)
or FlatBorder (for scaled margins).

@lgoix
Copy link
Author

lgoix commented Apr 23, 2020

This is better, thank you

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

No branches or pull requests

2 participants