kirill-grouchnikov / radiance

Building modern, elegant and fast Swing applications
BSD 3-Clause "New" or "Revised" License
807 stars 89 forks source link

[Theming] RadianceTextUtilities.getForegroundColor should not return null for empty texts #466

Closed kirill-grouchnikov closed 7 months ago

kirill-grouchnikov commented 7 months ago

That logic does not belong in the foreground color computation.

In its current state, the logic is broken for cases such as icon-only command buttons in disabled state, as the text check short circuits the logic, returns null, and that is then treated to draw the icon with enabled state visuals.