From 6d83456d3dc974edf639745b69a244f934acba9d Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Mon, 21 Nov 2022 19:50:00 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-84407=20=E8=AE=BE=E8=AE=A1=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF-=E5=8D=95=E5=85=83=E6=A0=BC=E5=85=83=E7=B4=A0?= =?UTF-8?q?=EF=BC=8C=E5=9B=BD=E9=99=85=E5=8C=96=E6=98=BE=E7=A4=BA=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91UIlabel?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E8=A2=AB=E9=BB=98=E8=AE=A4=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?3=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91UIlab?= =?UTF-8?q?el=E9=AB=98=E5=BA=A6=E5=87=8F=E5=B0=913=20=E3=80=90review?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E3=80=91=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/quickeditor/CellQuickEditor.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java index 67a65672f1..1793efa17d 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java @@ -67,6 +67,7 @@ public abstract class CellQuickEditor extends QuickEditor { private static final int CONTENT_PANE_WIDTH_GAP = 3; private static final int MOUSE_WHEEL_SPEED = 5; private static final int SCROLLBAR_WIDTH = 7; + private final int HTML_SHIFT_HEIGHT = -3; private UILabel cellLabel; private int maxHeight = 280; @@ -285,10 +286,11 @@ public abstract class CellQuickEditor extends QuickEditor { if (selectedOneCell) { columnRowTextField.setPreferredSize(null); cellLabel.setPreferredSize(null); - multipleLabelTip.setPreferredSize(new Dimension()); + // 使用UILabel.getPreferredSize时,若文本为html高度被默认增加3 + multipleLabelTip.setPreferredSize(new Dimension(0, HTML_SHIFT_HEIGHT)); } else { - columnRowTextField.setPreferredSize(new Dimension()); - cellLabel.setPreferredSize(new Dimension()); + columnRowTextField.setPreferredSize(new Dimension(0, HTML_SHIFT_HEIGHT)); + cellLabel.setPreferredSize(new Dimension(0, HTML_SHIFT_HEIGHT)); multipleLabelTip.setPreferredSize(null); } }