Browse Source

REPORT-84407 设计面板-单元格元素,国际化显示

【问题原因】UIlabel高度被默认增加3
【改动思路】UIlabel高度减少3
【review建议】无
release/11.0
Leo.Qin 2 years ago
parent
commit
6d83456d3d
  1. 8
      designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

8
designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

@ -67,6 +67,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
private static final int CONTENT_PANE_WIDTH_GAP = 3; private static final int CONTENT_PANE_WIDTH_GAP = 3;
private static final int MOUSE_WHEEL_SPEED = 5; private static final int MOUSE_WHEEL_SPEED = 5;
private static final int SCROLLBAR_WIDTH = 7; private static final int SCROLLBAR_WIDTH = 7;
private final int HTML_SHIFT_HEIGHT = -3;
private UILabel cellLabel; private UILabel cellLabel;
private int maxHeight = 280; private int maxHeight = 280;
@ -285,10 +286,11 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
if (selectedOneCell) { if (selectedOneCell) {
columnRowTextField.setPreferredSize(null); columnRowTextField.setPreferredSize(null);
cellLabel.setPreferredSize(null); cellLabel.setPreferredSize(null);
multipleLabelTip.setPreferredSize(new Dimension()); // 使用UILabel.getPreferredSize时,若文本为html高度被默认增加3
multipleLabelTip.setPreferredSize(new Dimension(0, HTML_SHIFT_HEIGHT));
} else { } else {
columnRowTextField.setPreferredSize(new Dimension()); columnRowTextField.setPreferredSize(new Dimension(0, HTML_SHIFT_HEIGHT));
cellLabel.setPreferredSize(new Dimension()); cellLabel.setPreferredSize(new Dimension(0, HTML_SHIFT_HEIGHT));
multipleLabelTip.setPreferredSize(null); multipleLabelTip.setPreferredSize(null);
} }
} }

Loading…
Cancel
Save