From 5afe8a59f33e5a6b8be6fa663edc73c43d4d41af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Thu, 28 Dec 2023 10:05:56 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-111995=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=9D=A2=E6=9D=BF=E5=B8=83=E5=B1=80=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/quickeditor/CellQuickEditor.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 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 504dc1e4b..66d3047c4 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java @@ -1,6 +1,7 @@ package com.fr.quickeditor; import com.fine.swing.ui.layout.Layouts; +import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.GraphHelper; import com.fr.base.Style; @@ -69,14 +70,13 @@ public abstract class CellQuickEditor extends QuickEditor { /** * 滚动条相关配置 */ - private static final int MAXVALUE = 100; - private static final int CONTENT_PANE_WIDTH_GAP = 3; + private static final int MAXVALUE = FineUIScale.scale(100); + private static final int SCROLLBAR_WIDTH = FineUIScale.scale(10); private static final int MOUSE_WHEEL_SPEED = 5; - private static final int SCROLLBAR_WIDTH = 7; private UILabel cellLabel; - private int maxHeight = 280; - private static final int TITLE_HEIGHT = 50; + private int maxHeight = FineUIScale.scale(280); + private static final int TITLE_HEIGHT = FineUIScale.scale(50); /** * 面板配置 @@ -142,7 +142,7 @@ public abstract class CellQuickEditor extends QuickEditor { int width = parent.getWidth(); int height = parent.getHeight(); leftContentPane.setBounds(0, -beginY, width - SCROLLBAR_WIDTH, height + beginY); - scrollBar.setBounds(width - SCROLLBAR_WIDTH - CONTENT_PANE_WIDTH_GAP, 0, SCROLLBAR_WIDTH + CONTENT_PANE_WIDTH_GAP, height); + scrollBar.setBounds(width - SCROLLBAR_WIDTH, 0, SCROLLBAR_WIDTH, height); leftContentPane.validate(); } }); @@ -333,9 +333,9 @@ public abstract class CellQuickEditor extends QuickEditor { } }); - scrollBar.setPreferredSize(new Dimension(SCROLLBAR_WIDTH + CONTENT_PANE_WIDTH_GAP, this.getHeight())); - scrollBar.setBlockIncrement(SCROLLBAR_WIDTH + CONTENT_PANE_WIDTH_GAP); - scrollBar.setBorder(BorderFactory.createMatteBorder(0, CONTENT_PANE_WIDTH_GAP, 0, 0, this.getBackground())); + scrollBar.setPreferredSize(new Dimension(SCROLLBAR_WIDTH, this.getHeight())); + scrollBar.setBlockIncrement(SCROLLBAR_WIDTH); + scrollBar.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, this.getBackground())); } /**