-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Wrong rollover color for buttons with a background color property #21
Comments
Great idea. This should also reduce the number of colors to configure... BTW you can disable the rollover effect for buttons: blueButton.setRolloverEnabled( false ); |
In my special case (color selector) it is not optimal if the rollover changes the color, even if it changes only a little, like in Nimbus. On the other hand it's nice to have some rollover effect, otherwise it looks kind of dead. Probably I will end up using some custom JComponent, but at least I found some bugs for you :) |
…al button background color (issue #21)
fixed in 0.17 |
reopened because the derived hover background color for the blue button in the above test case is hardly to recognize |
Looks OK to me, but you know... In the code I chose that shade of blue, and not simply Color.BLUE because I found that with the pure blue the color change can't be seen even with Nimbus (although there is some other change in the border - maybe you could also do something with the border, as you already do in the case of uncolored buttons). I thought that pure blue must be a rare special case. With pure blue I also don't see a color change with FlatDarculaLaf, but hey, it is enough if it is as good in this regard as Nimbus... :) In general I think that this should be a subtle, "subconscious" effect, just to get a feeling that something changed. Probably it also depends on monitor configuration whether two colors can be distinguished or not. |
In the meantime I realized that there is a rollover change in the borders, I didn't see it yesterday because it just happens to be a similar color to the blue of the background. So this is already perfect as far as I am concerned. |
Thanks @lbalazscs |
Using 0.16 and FlatDarculaLaf, buttons have a grey color when the mouse is over them, which is OK when there is no background color set for the button, but looks quite strange (sudden large color changes) when there is an explicitly set background color.
Instead the rollover color should be derived from the background color (if there is one), for example using a lighter or darker version of it (or leaving it as it is). java.awt.Color has brighter() and darker() methods for easily deriving such colors at runtime.
The text was updated successfully, but these errors were encountered: