Browse Source

Merge pull request #1341 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit 'bf293a5297c825a8044cb37c39c133ce9d52dfd6':
  REPORT-4978 [9.0二轮回归]设计器控件设置界面,控件图标显示有问题,左边被遮挡
master
superman 7 years ago
parent
commit
14d23a8b9a
  1. 6
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  2. 5
      designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java

6
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

5
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{

Loading…
Cancel
Save