From 3b09ea22b35e23f36553357e1330ee7f101d5da0 Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 27 Mar 2023 20:09:55 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-92439=20mac=E4=B8=8B-=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E6=94=B6=E8=B5=B7=E5=9B=BE=E6=A0=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/base/svg/SVGIcon.java | 4 ++-- .../gui/icontainer/UIEastResizableContainer.java | 4 ++-- .../design/gui/icontainer/UIResizableContainer.java | 12 ++++++------ .../fr/design/mainframe/EastRegionContainerPane.java | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java b/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java index 1280fbf737..832fd33e91 100644 --- a/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java +++ b/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java @@ -1,6 +1,6 @@ package com.fr.base.svg; -import com.fr.design.utils.SvgPaintUtils; +import com.fr.design.utils.SvgDrawUtils; import com.fr.general.IOUtils; import javax.swing.Icon; @@ -37,7 +37,7 @@ public class SVGIcon implements Icon { public void paintIcon(Component c, Graphics g, int x, int y) { if (HI_DPI_SURPORT) { Graphics2D graphics = (Graphics2D) g.create(x, y, image.getWidth(null), image.getHeight(null)); - SvgPaintUtils.doDrawSVG(graphics, () -> SvgPaintUtils.drawImage(graphics, image, 0, 0, null)); + SvgDrawUtils.doDrawSVG(graphics, () -> SvgDrawUtils.drawImage(graphics, image, 0, 0, null)); graphics.dispose(); } else { g.drawImage(image, x, y, null); diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java index c018e622f1..cec4b840a7 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -5,7 +5,7 @@ import com.fr.design.base.mode.DesignModeContext; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.utils.SvgPaintUtils; +import com.fr.design.utils.SvgDrawUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.JComponent; @@ -337,7 +337,7 @@ public class UIEastResizableContainer extends JPanel { button = UIConstants.DRAG_RIGHT_PRESS; } } - SvgPaintUtils.doDrawSVG(g, () -> SvgPaintUtils.drawImage(g, button, 10, 7, null)); + SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, button, 10, 7, null)); } } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java index 0c69d47e74..a7682107ec 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -3,7 +3,7 @@ package com.fr.design.gui.icontainer; import com.fr.base.vcs.DesignerMode; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.utils.SvgPaintUtils; +import com.fr.design.utils.SvgDrawUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.Constants; @@ -421,9 +421,9 @@ public class UIResizableContainer extends JPanel { Image upButton = (upModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_UP_NORMAL : UIConstants.DRAG_UP_PRESS); Image downButton = (downModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_DOWN_NORMAL : UIConstants.DRAG_DOWN_PRESS); g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, getWidth(), getHeight(), null); - SvgPaintUtils.doDrawSVG(g, () -> SvgPaintUtils.drawImage(g, UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, null)); - SvgPaintUtils.doDrawSVG(g, () -> SvgPaintUtils.drawImage(g, upButton, ARROW_MARGIN, 0, null)); - SvgPaintUtils.doDrawSVG(g, () -> SvgPaintUtils.drawImage(g, downButton, (getWidth() - toolPaneHeight - ARROW_MARGIN), 0, null)); + SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, null)); + SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, upButton, ARROW_MARGIN, 0, null)); + SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, downButton, (getWidth() - toolPaneHeight - ARROW_MARGIN), 0, null)); } } @@ -520,7 +520,7 @@ public class UIResizableContainer extends JPanel { button = UIConstants.DRAG_LEFT_PRESS; } } - SvgPaintUtils.doDrawSVG(g, () -> SvgPaintUtils.drawImage(g, button, -6, ARROW_MARGIN_VERTICAL, VerticalToolPane.this)); + SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, button, -6, ARROW_MARGIN_VERTICAL, VerticalToolPane.this)); } else { g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, toolPaneHeight, getHeight(), null); if (containerWidth == toolPaneHeight) { @@ -536,7 +536,7 @@ public class UIResizableContainer extends JPanel { button = UIConstants.DRAG_RIGHT_PRESS; } } - SvgPaintUtils.doDrawSVG(g, () -> SvgPaintUtils.drawImage(g, button, 10, ARROW_MARGIN_VERTICAL, VerticalToolPane.this)); + SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, button, 10, ARROW_MARGIN_VERTICAL, VerticalToolPane.this)); } if (isLeftRightDragEnabled) { g.drawImage(UIConstants.DRAG_DOT_VERTICAL, 2, getHeight() / 2, 5, toolPaneHeight, null); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index e6490b84de..c8f7281a32 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -19,7 +19,7 @@ import com.fr.design.notification.SnapChat; import com.fr.design.notification.SnapChatFactory; import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.DesignUtils; -import com.fr.design.utils.SvgPaintUtils; +import com.fr.design.utils.SvgDrawUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.log.FineLoggerFactory; @@ -1314,7 +1314,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } else { button = UIConstants.POP_BUTTON_UP; } - SvgPaintUtils.doDrawSVG(g, () -> SvgPaintUtils.drawImage(g, button, (ARROW_RANGE_START + 8), 4, null)); + SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, button, (ARROW_RANGE_START + 8), 4, null)); } }