mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 15:07:11 -06:00
bug: AbstractButton's ContentAreaFilled=false not honored when parent is a CellRendererPane
This commit is contained in:
@@ -11,6 +11,8 @@ FlatLaf Change Log
|
|||||||
- TabbedPane: New option to allow tab separators to take full height (to enable
|
- TabbedPane: New option to allow tab separators to take full height (to enable
|
||||||
use `UIManager.put( "TabbedPane.tabSeparatorsFullHeight", true );`). (issue
|
use `UIManager.put( "TabbedPane.tabSeparatorsFullHeight", true );`). (issue
|
||||||
#59, PR #62)
|
#59, PR #62)
|
||||||
|
- CheckBox and RadioButton: Do not fill background if `contentAreaFilled` is
|
||||||
|
`false`. (issue #58, PR #63)
|
||||||
|
|
||||||
|
|
||||||
## 0.26
|
## 0.26
|
||||||
|
|||||||
@@ -118,11 +118,13 @@ public class FlatRadioButtonUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paint( Graphics g, JComponent c ) {
|
public void paint( Graphics g, JComponent c ) {
|
||||||
// fill background even if opaque if
|
// fill background even if not opaque if
|
||||||
// - used as cell renderer (because of selection background)
|
// - contentAreaFilled is true and
|
||||||
// - if background was explicitly set to a non-UIResource color
|
// - used as cell renderer (because of selection background)
|
||||||
|
// - or if background was explicitly set to a non-UIResource color
|
||||||
if( !c.isOpaque() &&
|
if( !c.isOpaque() &&
|
||||||
(c.getParent() instanceof CellRendererPane || !(c.getBackground() instanceof UIResource)) )
|
((AbstractButton)c).isContentAreaFilled() &&
|
||||||
|
(c.getParent() instanceof CellRendererPane || !(c.getBackground() instanceof UIResource)))
|
||||||
{
|
{
|
||||||
g.setColor( c.getBackground() );
|
g.setColor( c.getBackground() );
|
||||||
g.fillRect( 0, 0, c.getWidth(), c.getHeight() );
|
g.fillRect( 0, 0, c.getWidth(), c.getHeight() );
|
||||||
|
|||||||
Reference in New Issue
Block a user