mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make Darcula combos have same height as text fields
This commit is contained in:
+6
-6
@@ -93,7 +93,7 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border {
|
||||
final int tH = JBUI.scale(6);
|
||||
final int xU = (w - tW) / 2;
|
||||
final int yU = (h - tH) / 2;
|
||||
g.translate(JBUI.scale(2), 0);
|
||||
g.translate(JBUI.scale(2), JBUI.scale(1));
|
||||
final Path2D.Double path = new Path2D.Double();
|
||||
path.moveTo(xU, yU);
|
||||
path.lineTo(xU + tW, yU);
|
||||
@@ -105,7 +105,7 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border {
|
||||
//path.lineTo(xU + 1, yU + 2);
|
||||
path.closePath();
|
||||
g.fill(path);
|
||||
g.translate(-JBUI.scale(2), 0);
|
||||
g.translate(-JBUI.scale(2), -JBUI.scale(1));
|
||||
if (!isTableCellEditor(myComboBox)) {
|
||||
g.setColor(getArrowButtonFillColor(getBorderColor()));
|
||||
g.drawLine(0, -1, 0, h);
|
||||
@@ -224,7 +224,7 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border {
|
||||
protected Rectangle rectangleForCurrentValue() {
|
||||
final Rectangle r = super.rectangleForCurrentValue();
|
||||
r.x-= JBUI.scale(2);
|
||||
r.y-= isTableCellEditor(myComboBox) ? 0 : JBUI.scale(1);
|
||||
r.y-= isTableCellEditor(myComboBox) ? 0 : 0;//JBUI.scale(1);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border {
|
||||
final Color borderColor = getBorderColor();//ColorUtil.shift(UIUtil.getBorderColor(), 4);
|
||||
g.setColor(getArrowButtonFillColor(borderColor));
|
||||
int off = hasFocus ? 1 : 0;
|
||||
g.drawLine(xxx + JBUI.scale(5), y + JBUI.scale(1) + off, xxx + JBUI.scale(5), height - JBUI.scale(3));
|
||||
g.drawLine(xxx + JBUI.scale(5), y + JBUI.scale(1) + off, xxx + JBUI.scale(5), height - JBUI.scale(2));
|
||||
|
||||
Rectangle r = rectangleForCurrentValue();
|
||||
paintCurrentValueBackground(g, r, hasFocus);
|
||||
@@ -373,13 +373,13 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border {
|
||||
}
|
||||
else {
|
||||
g.setColor(borderColor);
|
||||
g.drawRoundRect(JBUI.scale(1), JBUI.scale(1), width - JBUI.scale(2), height - JBUI.scale(4), R, R);
|
||||
g.drawRoundRect(JBUI.scale(1), JBUI.scale(1), width - JBUI.scale(2), height - JBUI.scale(2), R, R);
|
||||
if (!UIUtil.isUnderDarcula() && comboBox.isEnabled()) {
|
||||
g.setColor(getArrowButtonFillColor(getBorderColor()));
|
||||
final Shape clip = g.getClip();
|
||||
final int offX = xxx + JBUI.scale(5);
|
||||
g.setClip(offX, y, width - offX, height);
|
||||
g.drawRoundRect(JBUI.scale(1), JBUI.scale(1), width - JBUI.scale(2), height - JBUI.scale(4), R, R);
|
||||
g.drawRoundRect(JBUI.scale(1), JBUI.scale(1), width - JBUI.scale(2), height - JBUI.scale(2), R, R);
|
||||
g.setClip(clip);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user