From 107e450d12af256e75721c44aeabfcdeea3c9416 Mon Sep 17 00:00:00 2001 From: renekton Date: Thu, 15 Aug 2024 14:11:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E4=BE=8B=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=BC=B9=E7=AA=97=E7=BC=A9=E6=94=BE=EF=BC=8C?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=85=B6=E4=BB=96=E6=A8=A1=E6=9D=BF=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E7=89=88=E6=9C=AC=E6=9C=AA=E6=9B=B4=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=B7=A6=E5=8F=B3=E9=9D=A2=E6=9D=BF=E5=88=86?= =?UTF-8?q?=E5=89=B2=E4=BD=8D=E7=BD=AE=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/controlpane/JControlPane.java | 3 ++- .../java/com/fr/design/mainframe/vcs/common/VcsHelper.java | 6 +++++- .../fr/van/chart/designer/style/VanChartPlotLegendPane.java | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java index 591b80a4db..b957a1370d 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java @@ -1,5 +1,6 @@ package com.fr.design.gui.controlpane; +import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.border.FineBorderFactory; @@ -29,7 +30,7 @@ import java.util.stream.Stream; * Time: 15:07 */ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, ShortCutListenerProvider { - private static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30 + private static final int SHORT_WIDTH = FineUIScale.scale(30); //每加一个short Divider位置加30 private static final String SELECT = "SELECT"; private static final String EDIT = "EDIT"; JPanel controlUpdatePane; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java index 15787348fe..6730fb79ef 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java @@ -184,6 +184,10 @@ public class VcsHelper implements JTemplateActionListener { private String getEditingFilename() { JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + return getFilename(jt); + } + + private String getFilename(JTemplate jt) { String editingFilePath = jt.getEditingFILE().getPath(); return VcsFileUtils.dealWithFilePath(editingFilePath); } @@ -215,7 +219,7 @@ public class VcsHelper implements JTemplateActionListener { fireVcs.execute(new Runnable() { @Override public void run() { - String fileName = getEditingFilename(); + String fileName = getFilename(jt); VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class); VcsEntity entity = operator.getFileVersionByIndex(fileName, 0); boolean replace = needDeleteVersion(entity); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index 5dd1014520..6dac8d07dd 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -51,8 +51,8 @@ import static com.fine.swing.ui.layout.Layouts.row; public class VanChartPlotLegendPane extends BasicPane { private static final long serialVersionUID = 1614283200308877353L; - private static final int WIDTH = 165; - private static final int HEIGHT = 100; + private static final int WIDTH = FineUIScale.scale(165); + private static final int HEIGHT = FineUIScale.scale(100); private static final int GAP = 20; private Plot plot;