-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
Rounded buttons are opaque #20
Comments
You're right. Most components in FlatLaf (also in Metal and Windows LaF) are opaque. I just used the default opacity of the components.
Nimbus, Substance and Aqua seem to use much more non-opaque components. Which makes sense, if the component does not fill its whole bounds. Seems that I have to rework usage of opacity in FlatLaf completely... |
Yeah, I don't think that this has ever been on the Swing team radar - have some kind of a mechanism akin to the |
Hmm, isn't LookAndFeel.installProperty( comboBox, "opaque", Boolean.FALSE);
As soon as the developer invokes Isn't this the same as when the developer invokes I think when the developer uses |
It eventually does get to set a separate OPAQUE_SET flag on the component, but also calls setOpaque. Maybe I'm thinking of some kind of mechanism that has two places to store opacity - one for app calls, and one for the current look-and-feel calls, and then somehow queries the two together at paint time. That might be too complicated though. |
fixed in 0.16 |
The buttons don't seem to have real transparency at the corners and borders. Instead of the content behind them the panel color can be seen - this is only OK in simple cases when a button is on a panel.
In the following zoomed-in picture the red arrows indicate the problem areas. Here two buttons are placed on top of each other using a JLayeredPane in order to indicate the foreground and background colors that can be chosen. Such opaque areas don't appear when using Nimbus. Also the Intellij widgets have real transparency, this can be seen if you set a background picture in Idea.
The text was updated successfully, but these errors were encountered: