mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 15:07:11 -06:00
Button and ToggleButton: ToolBar buttons now respect explicitly set background color. If no background color is set, then the button background is not painted anymore (issue #191)
This commit is contained in:
@@ -410,8 +410,13 @@ public class FlatButtonUI
|
||||
if( model.isRollover() )
|
||||
return toolbarHoverBackground;
|
||||
|
||||
// use background of toolbar
|
||||
return c.getParent().getBackground();
|
||||
// use component background if explicitly set
|
||||
Color bg = c.getBackground();
|
||||
if( isCustomBackground( bg ) )
|
||||
return bg;
|
||||
|
||||
// do not paint background
|
||||
return null;
|
||||
}
|
||||
|
||||
boolean def = isDefaultButton( c );
|
||||
|
||||
Reference in New Issue
Block a user