ComboBox: fixed background if explicit color is set (for not editable combobox)

This commit is contained in:
Karl Tauber
2019-08-27 12:49:26 +02:00
parent d9c9cce194
commit 5d974fef37

View File

@@ -234,6 +234,12 @@ public class FlatComboBoxUI
super.paintCurrentValue( g, bounds, false );
}
@Override
public void paintCurrentValueBackground( Graphics g, Rectangle bounds, boolean hasFocus ) {
g.setColor( comboBox.isEnabled() ? comboBox.getBackground() : disabledBackground );
g.fillRect( bounds.x, bounds.y, bounds.width, bounds.height );
}
//---- class FlatArrowButton ----------------------------------------------
private class FlatArrowButton