-
-
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
Component.isBackgroundSet() and similar not respected #32
Comments
Hi Chrriis, thanks for the complements 😃 Yes, if the toggle button is selected (or disabled) then the component background and foreground colors are not used. In other states (unselected, hover and pressed) those colors are used. If you've build FlatLaf locally, you can run FlatComponentsTest and check the "explicit colors" checkbox try it out: So the toggle button should compute reasonable background and foreground colors for the selected state, based on the component colors, right? Sounds like a good idea 👍 |
I wonder what the expected behavior is. I checked with a different look and feel, and unless I am missing something it was ignored there too. Maybe deriving a reasonable background is not a bad idea. Now, the problem is to define "reasonable" 🙂 My original problem is that we use toggle buttons in a panel to act as task bar buttons and the difference between selected and not selected was not obvious with FlatLaf, so I tried to force colors. In the original look and feel there is a better contrast by default. While I could change the colors for all buttons of FlatLaf, I only wanted to alter these task bar buttons. |
Hi,
I have a toggle button on which the background and foreground colors are forced, but it paints as if these were not set. It seems the code in Flat*ButtonUI does not get the background from the component even though they were explicitly set.
Am I missing something?
PS: very good work, I am impressed by the quality of FlatLaf!
The text was updated successfully, but these errors were encountered: