From af366833c8c4db2bd3a8345f1bf38b381cfa829c Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Mon, 27 Jul 2015 14:53:32 +0300 Subject: [PATCH] IDEA-143135 HiDPI on Linux: ComboBox UI bug --- .../ide/ui/laf/darcula/ui/DarculaComboBoxUI.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaComboBoxUI.java b/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaComboBoxUI.java index 1d129e4beb0c..8442ffdeda90 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaComboBoxUI.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaComboBoxUI.java @@ -343,23 +343,23 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border { g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); final int R = JBUI.scale(5); if (hasFocus) { - g.setClip(2, 2, comboBox.getWidth()- 4, comboBox.getHeight() - 4); //todo[kb] check HiDPI + g.setClip(JBUI.scale(2), JBUI.scale(2), comboBox.getWidth()- JBUI.scale(4), comboBox.getHeight() - JBUI.scale(4)); } if (editor != null && comboBox.isEditable()) { ((JComponent)editor).setBorder(null); g.setColor(editor.getBackground()); - g.fillRoundRect(x + 1, y + 1, W, H, R, R); + g.fillRoundRect(x + JBUI.scale(1), y + JBUI.scale(1), W, H, R, R); g.setColor(getArrowButtonFillColor(arrowButton.getBackground())); - g.fillRoundRect(xxx, y + 1, width - xxx, H, R, R); + g.fillRoundRect(xxx, y + JBUI.scale(1), width - xxx, H, R, R); g.setColor(editor.getBackground()); - g.fillRect(xxx, y + 1, 5, H); + g.fillRect(xxx, y + JBUI.scale(1), JBUI.scale(5), H); } else { g.setColor(UIUtil.getPanelBackground()); - g.fillRoundRect(x + 1, y + 1, W, H, R, R); + g.fillRoundRect(x + JBUI.scale(1), y + JBUI.scale(1), W, H, R, R); g.setColor(getArrowButtonFillColor(arrowButton.getBackground())); - g.fillRoundRect(xxx, y + 1, width - xxx, H, R, R); + g.fillRoundRect(xxx, y + JBUI.scale(1), width - xxx, H, R, R); g.setColor(UIUtil.getPanelBackground()); - g.fillRect(xxx, y + 1, 5, H); + g.fillRect(xxx, y + JBUI.scale(1), JBUI.scale(5), H); } final Color borderColor = getBorderColor();//ColorUtil.shift(UIUtil.getBorderColor(), 4); g.setColor(getArrowButtonFillColor(borderColor));