From b42207570a581c8f082e06042a9f633f4d0a004c Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 12 Sep 2024 20:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-realize/src/main/java/com/fr/grid/GridRowUI.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridRowUI.java b/designer-realize/src/main/java/com/fr/grid/GridRowUI.java index e979aa9950..5a7f0bf420 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridRowUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridRowUI.java @@ -32,6 +32,7 @@ import java.awt.geom.Rectangle2D; * @since 2012-3-22下午5:54:21 */ public class GridRowUI extends ComponentUI { + private static final int OFFSET = 2; protected Color editedBackground = UIManager.getColor("Center.GridColumnRowEditedColor"); protected Color selectedBackground = UIManager.getColor("Center.GridColumnRowSelectedColor"); @@ -166,7 +167,7 @@ public class GridRowUI extends ComponentUI { Rectangle2D bounds = new TextLayout(paintText, gridRow.getFont(), fontRenderContext).getBounds(); double stringHeight = bounds.getHeight() * time; // 如果高度太小了就不画了 - if (stringHeight <= increaseHeight + 2) { + if (stringHeight <= increaseHeight + OFFSET) { if (isSelectedBounds) { g2d.setColor(gridRow.getSelectedForeground()); } else {