|
|
@ -206,9 +206,10 @@ public class DarkComboBoxUI extends BasicComboBoxUI implements ComboBoxConstants |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void paint(final Graphics g, final JComponent c) { |
|
|
|
public void paint(final Graphics g, final JComponent c) { |
|
|
|
if (!comboBox.isEditable()) { |
|
|
|
if (!comboBox.isEditable()) { |
|
|
|
|
|
|
|
Rectangle rect = rectangleForCurrentValue(); |
|
|
|
Component currentValueRenderer = getRendererForCurrentValue(); |
|
|
|
Component currentValueRenderer = getRendererForCurrentValue(); |
|
|
|
paintBackground(g, c, currentValueRenderer); |
|
|
|
paintBackground(g, c, currentValueRenderer); |
|
|
|
paintCurrentValue(g, rectangleForCurrentValue(), hasFocus, currentValueRenderer); |
|
|
|
paintCurrentValue(g, rect, hasFocus, currentValueRenderer); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
paintBackground(g, c, getEditorComponent()); |
|
|
|
paintBackground(g, c, getEditorComponent()); |
|
|
|
} |
|
|
|
} |
|
|
@ -366,9 +367,8 @@ public class DarkComboBoxUI extends BasicComboBoxUI implements ComboBoxConstants |
|
|
|
((JComponent) c).setOpaque(false); |
|
|
|
((JComponent) c).setOpaque(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
boolean shouldValidate = c instanceof JPanel; |
|
|
|
|
|
|
|
Rectangle r = new Rectangle(bounds); |
|
|
|
Rectangle r = new Rectangle(bounds); |
|
|
|
currentValuePane.paintComponent(g, c, comboBox, r.x, r.y, r.width, r.height, shouldValidate); |
|
|
|
currentValuePane.paintComponent(g, c, comboBox, r.x, r.y, r.width, r.height, c instanceof JPanel); |
|
|
|
// return opaque for combobox popup items painting
|
|
|
|
// return opaque for combobox popup items painting
|
|
|
|
if (changeOpaque) { |
|
|
|
if (changeOpaque) { |
|
|
|
((JComponent) c).setOpaque(true); |
|
|
|
((JComponent) c).setOpaque(true); |
|
|
|