From b852fa8192ddc04c802508197b6e873661d3504b Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 16 Aug 2024 19:16:57 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-127437=20fix:=20=E6=96=B0=E5=BB=BA=20pol?= =?UTF-8?q?y=20sheet=20=E6=8C=89=E9=92=AE=E7=BC=A9=E6=94=BE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/file/MultiTemplateTabPane.java | 2 +- .../src/main/java/com/fr/design/style/color/ColorPicker.java | 3 +-- .../java/com/fr/design/style/color/CustomChooserPanel.java | 4 ++-- .../main/java/com/fr/design/mainframe/SheetNameTabPane.java | 5 +++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java index 8d25db7470..4d0c2d994b 100644 --- a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java @@ -710,7 +710,7 @@ public class MultiTemplateTabPane extends Row { private boolean isOverListDown(int evtX) { - int maxWidth = getWidth() - scale(leadingWidth); + int maxWidth = getWidth() - scale(TRAILING_WIDTH); return evtX >= (maxWidth + SMALLGAP) && evtX <= (getWidth() - SMALLGAP); } diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java b/designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java index 19e025dd70..067d82f9ce 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java @@ -4,7 +4,6 @@ package com.fr.design.style.color; * Created by plough on 2016/12/22. */ -import com.fine.theme.utils.FineUIScale; import com.fr.design.DesignerEnvManager; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.IOUtils; @@ -26,7 +25,7 @@ public class ColorPicker extends JDialog implements ActionListener { private Container container = getContentPane(); // 主容器 private int setCoordinateX; // 取色框x坐标 private int setCoordinateY; // 取色框y坐标 - private int colorPickerSize = FineUIScale.scale(190); // 取色框尺寸 + private int colorPickerSize = 190; // 取色框尺寸 private int scaleFactor = 16; // 放大倍数 private ColorPickerPanel colorPickerPanel = new ColorPickerPanel(scaleFactor); // 取色框内容面板 diff --git a/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java b/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java index 968efd34b7..48f5e5f2bf 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java +++ b/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java @@ -718,7 +718,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec BUTTON_SPINNER_GAP, row(fix((int) hRadio.getPreferredSize().getHeight()), cell(new UILabel("#")), flex()).with(it -> it.setPreferredSize(hRadio.getPreferredSize())), cell(field), - cell(pane) + cell(pane).with(it -> it.setPreferredSize(new Dimension((int) pickColorButton.getPreferredSize().getWidth(), (int) pickColorButton.getPreferredSize().getHeight()))) ) ).getComponent()); @@ -790,7 +790,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec TextDocumentListener listen = new TextDocumentListener(); field = new UITextField(); - field.setPreferredSize(FineUIScale.scale(new Dimension(hSpinner.getPreferredSize()))); + field.setPreferredSize(new Dimension(hSpinner.getPreferredSize())); field.getDocument().addDocumentListener(listen); return column( diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java index b815cc985f..304639ec5c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java @@ -55,6 +55,7 @@ import java.awt.geom.RoundRectangle2D; import java.util.ArrayList; import java.util.List; +import static com.fine.theme.utils.FineUIScale.scale; import static com.fine.theme.utils.FineUIStyle.LIGHT_GREY; @@ -579,9 +580,9 @@ public class SheetNameTabPane extends JPanel implements MouseListener, MouseMoti } private void processLeftMouseButton(int evtX){ - if (evtX > iconLocation && evtX < iconLocation + GRID_TOSHEET_RIGHT) { + if (evtX > iconLocation && evtX < iconLocation + scale(GRID_TOSHEET_RIGHT)) { firstInsertActionPerformed(); - } else if (evtX > iconLocation + POLY_TOSHEET_LEFT && evtX < iconLocation + POLY_TOSHEET_RIGHT) { + } else if (evtX > iconLocation + scale(POLY_TOSHEET_LEFT) && evtX < iconLocation + scale(POLY_TOSHEET_RIGHT)) { new PolyReportInsertAction().actionPerformed(null); }