From 7f2b3eec2ab5278ba37ce503baee1cc94d688bf8 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 11 Oct 2017 16:06:21 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4978=20[9.0=E4=BA=8C=E8=BD=AE=E5=9B=9E?= =?UTF-8?q?=E5=BD=92]=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=98=BE=E7=A4=BA=E6=9C=89=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E5=B7=A6=E8=BE=B9=E8=A2=AB=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/icombobox/UIComboBoxUI.java | 6 +++++- .../src/com/fr/design/mainframe/widget/UITreeComboBox.java | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java b/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java index cebf2a07a7..9912594c89 100644 --- a/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java +++ b/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java @@ -94,6 +94,10 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener { */ @Override public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { + paintCurrentValue(g, bounds, hasFocus, 0); + } + + public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus, int paddingLeft) { ListCellRenderer renderer = comboBox.getRenderer(); Component c; @@ -142,7 +146,7 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener { int x = bounds.x, y = bounds.y, w = bounds.width, h = bounds.height; - currentValuePane.paintComponent(g, c, comboBox, x, y, w, h, shouldValidate); + currentValuePane.paintComponent(g, c, comboBox, x + paddingLeft, y, w, h, shouldValidate); } @Override diff --git a/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java b/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java index 31be76569b..749bdceb74 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java +++ b/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java @@ -121,6 +121,11 @@ public class UITreeComboBox extends UIComboBox { protected ComboPopup createPopup() { return new TreePopup(comboBox); } + + @Override + public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { + paintCurrentValue(g, bounds, hasFocus, 3); + } } class MotifJTreeComboBoxUI extends MotifComboBoxUI{