From 9f0f3de839867f4de9640c053c3bee0bcf521a7b Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 23 Mar 2023 11:30:02 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-92304=20=E8=AE=BE=E8=AE=A1=E5=99=A8-?= =?UTF-8?q?=E5=9B=BE=E6=A0=87-=E4=B8=89=E8=A7=92=E5=BD=A2=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/constants/UIConstants.java | 20 +++++++++--------- .../icontainer/UIEastResizableContainer.java | 19 ++++++++++++++--- .../mainframe/EastRegionContainerPane.java | 5 ++++- .../fr/design/images/control/down_arrow.png | Bin 218 -> 0 bytes .../fr/design/images/control/east_arrow.png | Bin 241 -> 0 bytes .../com/fr/design/images/control/up_arrow.png | Bin 190 -> 0 bytes .../fr/design/images/control/west_arrow.png | Bin 242 -> 0 bytes .../standard/arrowlinear/down_arrow.svg | 3 +++ .../standard/arrowlinear/east_arrow.svg | 3 +++ .../design/standard/arrowlinear/up_arrow.svg | 3 +++ .../standard/arrowlinear/west_arrow.svg | 3 +++ .../com/fr/design/standard/fileicon/minus.svg | 6 +++--- .../com/fr/design/standard/fileicon/plus.svg | 4 ++-- .../fr/design/standard/floatpop_normal.svg | 13 ++++++------ .../standard/poparrow/pop_down_arrow.svg | 10 +++++++++ .../design/standard/poparrow/pop_up_arrow.svg | 3 +++ .../standard/preview_down_icon_normal.svg | 3 +++ .../standard/triangle.arrow/down_hover.svg | 4 ++-- .../standard/triangle.arrow/down_normal.svg | 2 +- .../standard/triangle.arrow/up_hover.svg | 2 +- .../standard/triangle.arrow/up_normal.svg | 2 +- .../design/cell/bar/DynamicScrollButton.java | 13 ++++++++++-- 22 files changed, 85 insertions(+), 33 deletions(-) delete mode 100644 designer-base/src/main/resources/com/fr/design/images/control/down_arrow.png delete mode 100644 designer-base/src/main/resources/com/fr/design/images/control/east_arrow.png delete mode 100644 designer-base/src/main/resources/com/fr/design/images/control/up_arrow.png delete mode 100644 designer-base/src/main/resources/com/fr/design/images/control/west_arrow.png create mode 100644 designer-base/src/main/resources/com/fr/design/standard/arrowlinear/down_arrow.svg create mode 100644 designer-base/src/main/resources/com/fr/design/standard/arrowlinear/east_arrow.svg create mode 100644 designer-base/src/main/resources/com/fr/design/standard/arrowlinear/up_arrow.svg create mode 100644 designer-base/src/main/resources/com/fr/design/standard/arrowlinear/west_arrow.svg create mode 100644 designer-base/src/main/resources/com/fr/design/standard/poparrow/pop_down_arrow.svg create mode 100644 designer-base/src/main/resources/com/fr/design/standard/poparrow/pop_up_arrow.svg create mode 100644 designer-base/src/main/resources/com/fr/design/standard/preview_down_icon_normal.svg diff --git a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java index da05a79dd5..eba4a5634a 100644 --- a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java +++ b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java @@ -153,10 +153,10 @@ public interface UIConstants { public static final BufferedImage DRAG_BAR = IOUtils.readImage("com/fr/design/images/control/bar.png"); public static final BufferedImage DRAG_BAR_LIGHT = IOUtils.readImage("com/fr/design/images/control/bar-light.png"); - public static final BufferedImage ARROW_NORTH = IOUtils.readImage("com/fr/design/images/control/up_arrow.png"); - public static final BufferedImage ARROW_SOUTH = IOUtils.readImage("com/fr/design/images/control/down_arrow.png"); - public static final BufferedImage ARROW_EAST = IOUtils.readImage("com/fr/design/images/control/east_arrow.png"); - public static final BufferedImage ARROW_WEST = IOUtils.readImage("com/fr/design/images/control/west_arrow.png"); + public static final Image ARROW_NORTH = SVGLoader.load("/com/fr/design/standard/arrowlinear/up_arrow.svg"); + public static final Image ARROW_SOUTH = SVGLoader.load("/com/fr/design/standard/arrowlinear/down_arrow.svg"); + public static final Image ARROW_EAST = SVGLoader.load("/com/fr/design/standard/arrowlinear/east_arrow.svg"); + public static final Image ARROW_WEST = SVGLoader.load("/com/fr/design/standard/arrowlinear/west_arrow.svg"); public static final BufferedImage DRAG_BAR_RIGHT = IOUtils.readImage("com/fr/design/images/control/barm.png"); public static final BufferedImage DRAG_BAR_LEFT = IOUtils.readImage("com/fr/design/images/control/barl.png"); @@ -172,24 +172,24 @@ public interface UIConstants { public static final Image DRAG_LINE = SVGLoader.load("/com/fr/design/standard/dot_line_normal.svg"); public static final BufferedImage ACCESSIBLE_EDITOR_DOT = IOUtils.readImage("com/fr/design/images/control/dot.png"); public static final BufferedImage DRAG_DOT_VERTICAL = IOUtils.readImage("com/fr/design/images/control/dotv.png"); - public static final BufferedImage POP_BUTTON_DOWN = IOUtils.readImage("com/fr/design/images/buttonicon/popdownarrow.png"); - public static final BufferedImage POP_BUTTON_UP = IOUtils.readImage("com/fr/design/images/buttonicon/popuparrow.png"); + public static final Image POP_BUTTON_DOWN = SVGLoader.load("/com/fr/design/standard/poparrow/pop_down_arrow.svg"); + public static final Image POP_BUTTON_UP = SVGLoader.load("/com/fr/design/standard/poparrow/pop_up_arrow.svg"); public static final BufferedImage DRAG_DOWN_SELECTED_SMALL = IOUtils.readImage("com/fr/design/images/buttonicon/downSelected.png"); public static final BufferedImage DRAG_LEFT_NORMAL_SMALL = IOUtils.readImage("com/fr/design/images/buttonicon/leftNormal.png"); public static final BufferedImage WATERMARK_BACKGROUND = IOUtils.readImage("/com/fr/design/images/dialog/watermark/" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_WaterMark_Background_Icon_File_Name")); public static final int MODEL_NORMAL = 0; public static final int MODEL_PRESS = 1; - public static final Icon ARROW_DOWN_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/arrowdown.png"); + public static final Icon ARROW_DOWN_ICON = IconUtils.readIcon("/com/fr/design/standard/arrowlinear/down_arrow.svg"); public static final Icon ARROW_UP_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/arrowup.png"); public static final Icon YES_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/yes.png"); public static final Icon CHOOSEN_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/select_item.png"); public static final Icon PRE_WIDGET_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/prewidget.png"); public static final Icon PRE_WIDGET_NORMAL_ICON = IconUtils.readIcon("com/fr/design/images/buttonicon/prewidget"); public static final Icon EDIT_NORMAL_ICON = IconUtils.readIcon("/com/fr/design/standard/uimode/edit"); - public static final Icon EDIT_PRESSED_ICON = IconUtils.readIcon("/com/fr/design/standard/uimode/edit"); + public static final Icon EDIT_PRESSED_ICON = IconUtils.readIcon("/com/fr/design/standard/uimode/edit_pressed.svg"); public static final Icon HIDE_NORMAL_ICON = IconUtils.readIcon("/com/fr/design/standard/uimode/hide"); - public static final Icon HIDE_PRESSED_ICON = IconUtils.readIcon("/com/fr/design/standard/uimode/hide"); + public static final Icon HIDE_PRESSED_ICON = IconUtils.readIcon("/com/fr/design/standard/uimode/hide_pressed.svg"); public static final Icon VIEW_NORMAL_ICON = IconUtils.readIcon("/com/fr/design/standard/uimode/view"); //public static final Icon VIEW_PRESSED_ICON = IconUtils.readIcon("/com/fr/design/standard/uimode/view"); @@ -221,7 +221,7 @@ public interface UIConstants { public static final int BUTTON_GROUP_ARC = 0; public static final int LARGEARC = 6; public static final Stroke BS = new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 2f, new float[]{3, 1}, 0); - public static final Icon PREVIEW_DOWN = IOUtils.readIcon("com/fr/design/images/buttonicon/prevew_down_icon.png"); + public static final Icon PREVIEW_DOWN = IconUtils.readIcon("/com/fr/design/standard/preview_down_icon"); public static final Icon CLOSE_OF_AUTHORITY = IOUtils.readIcon("/com/fr/design/images/m_report/close.png"); public static final Icon CLOSE_OVER_AUTHORITY = IOUtils.readIcon("/com/fr/design/images/m_report/close_over.png"); public static final Icon CLOSE_PRESS_AUTHORITY = IOUtils.readIcon("/com/fr/design/images/m_report/close_press.png"); 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 f00fbee498..ff75221627 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,10 +5,22 @@ 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.gui.GUICoreUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.JComponent; +import javax.swing.JFrame; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Container; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.LayoutManager; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; @@ -313,7 +325,7 @@ public class UIEastResizableContainer extends JPanel { @Override public void paint(Graphics g) { Image button; - + SvgPaintUtils.beforePaint((Graphics2D) g); if (containerWidth == leftPaneWidth) { if (model == UIConstants.MODEL_NORMAL) { button = UIConstants.DRAG_LEFT_NORMAL; @@ -328,6 +340,7 @@ public class UIEastResizableContainer extends JPanel { } } g.drawImage(button, 18, 7, this); + SvgPaintUtils.afterPaint((Graphics2D) g); } } } \ No newline at end of file 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 b033fa6171..00405d6093 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,6 +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.gui.GUICoreUtils; import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.log.FineLoggerFactory; @@ -1313,7 +1314,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } else { button = UIConstants.POP_BUTTON_UP; } - g.drawImage(button, ARROW_RANGE_START + 8, 4, 16, 16, null); + SvgPaintUtils.beforePaint((Graphics2D) g); + g.drawImage(button, ARROW_RANGE_START + 8, 4, null); + SvgPaintUtils.afterPaint((Graphics2D) g); } } diff --git a/designer-base/src/main/resources/com/fr/design/images/control/down_arrow.png b/designer-base/src/main/resources/com/fr/design/images/control/down_arrow.png deleted file mode 100644 index 26a780d5e2858e01e9c1fa4baa98674754d3a238..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|rg*wIhFAzD zCrGef;cZ;DOzm!48=G;=vZf~vSreYloM8F?-`~e9k8~YeznyrbU>2~M*@JHhTV$W) z%;E|G%P#T*`y{`|HCuZ`jas?fP|j=WB;M&NOaxlyYcm zFljiF@MhPpUCjoj22!gT6+Bl=4sX1n(7Yj&?c_sN2j?>m66+TQdY*D-U?}x+agbD+ RQU`P&gQu&X%Q~loCIE&}SR?=d diff --git a/designer-base/src/main/resources/com/fr/design/images/control/east_arrow.png b/designer-base/src/main/resources/com/fr/design/images/control/east_arrow.png deleted file mode 100644 index 918d75a9f910fdabb1e3f79faac235803684e51a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|R(rZQhFAzD zCrHd&uyUp6_Js=%_DI|}Obq_={=U7R!aXLF6LPa{Hc1#8u^+Q5cyJ&%J^gub{l7nv zyoTd0x1ULBNs1z{BnPPeK_;WW`*escQa&5EYLo5{CGBl zhCpNE&aT#0RS^m8qa90 diff --git a/designer-base/src/main/resources/com/fr/design/images/control/west_arrow.png b/designer-base/src/main/resources/com/fr/design/images/control/west_arrow.png deleted file mode 100644 index 5693190f9646d3cf5fca20ff24bf9d114e07c833..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|)_A%&hFAzD zCrC&xSh(=unw2X(#b@Ww+`y^S&1h=<=lAz~Zh>N@?!z}Kco}YG@n6}|)!M2ml5s(E zhFZ!j!I{lx*fRfpette{!n0kwb~T?UI+3%6t>F((k(uIIh2{@cj5pO{a?)~y*!g5C zUcGr!!}Ww!U~m2Zf9*G}G#=R?#W0B>Q|Xw%9JT{Ig(W36f4{%Kf7Ria!iiLc!W0Js po(9IMhR)8D>>c}+vt`_J820A+P5iQ={VdSk44$rjF6*2UngD4wV8H+Y diff --git a/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/down_arrow.svg b/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/down_arrow.svg new file mode 100644 index 0000000000..fc5d318bf7 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/down_arrow.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/east_arrow.svg b/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/east_arrow.svg new file mode 100644 index 0000000000..b4b54dea89 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/east_arrow.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/up_arrow.svg b/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/up_arrow.svg new file mode 100644 index 0000000000..cf615f3f37 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/up_arrow.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/west_arrow.svg b/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/west_arrow.svg new file mode 100644 index 0000000000..d5260bfd0f --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/arrowlinear/west_arrow.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/fileicon/minus.svg b/designer-base/src/main/resources/com/fr/design/standard/fileicon/minus.svg index 067df99f84..db4e76f2a9 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/fileicon/minus.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/fileicon/minus.svg @@ -1,3 +1,3 @@ - - - + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/fileicon/plus.svg b/designer-base/src/main/resources/com/fr/design/standard/fileicon/plus.svg index c2b0e9d9c4..f012490aee 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/fileicon/plus.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/fileicon/plus.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/floatpop_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/floatpop_normal.svg index 95806104dc..a9e45f1c8d 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/floatpop_normal.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/floatpop_normal.svg @@ -1,9 +1,8 @@ - - icon_悬浮元素&三角_normal - - - - + + + + + - + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/poparrow/pop_down_arrow.svg b/designer-base/src/main/resources/com/fr/design/standard/poparrow/pop_down_arrow.svg new file mode 100644 index 0000000000..8e4260b37d --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/poparrow/pop_down_arrow.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/poparrow/pop_up_arrow.svg b/designer-base/src/main/resources/com/fr/design/standard/poparrow/pop_up_arrow.svg new file mode 100644 index 0000000000..5c797c1f03 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/poparrow/pop_up_arrow.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/preview_down_icon_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/preview_down_icon_normal.svg new file mode 100644 index 0000000000..da4dd8c300 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/preview_down_icon_normal.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/down_hover.svg b/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/down_hover.svg index f83d881a5d..68870b99dd 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/down_hover.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/down_hover.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/down_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/down_normal.svg index 478b58eba7..db4e76f2a9 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/down_normal.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/down_normal.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/up_hover.svg b/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/up_hover.svg index 67045e796a..1b7312ff6e 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/up_hover.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/up_hover.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/up_normal.svg b/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/up_normal.svg index 2297284274..f767fbcf31 100644 --- a/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/up_normal.svg +++ b/designer-base/src/main/resources/com/fr/design/standard/triangle.arrow/up_normal.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/cell/bar/DynamicScrollButton.java b/designer-realize/src/main/java/com/fr/design/cell/bar/DynamicScrollButton.java index 20bb70d668..b250119510 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/bar/DynamicScrollButton.java +++ b/designer-realize/src/main/java/com/fr/design/cell/bar/DynamicScrollButton.java @@ -1,11 +1,18 @@ package com.fr.design.cell.bar; import com.fr.design.constants.UIConstants; +import com.fr.design.utils.SvgPaintUtils; import com.fr.general.ComparatorUtils; -import javax.swing.*; +import javax.swing.SwingConstants; import javax.swing.plaf.basic.BasicArrowButton; -import java.awt.*; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.GradientPaint; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.Insets; import java.awt.image.BufferedImage; import java.util.HashMap; @@ -62,6 +69,7 @@ public class DynamicScrollButton extends BasicArrowButton { private void paintArrow(Graphics g, Dimension size) { + SvgPaintUtils.beforePaint((Graphics2D) g); switch (direction) { case SwingConstants.NORTH: g.drawImage(UIConstants.ARROW_NORTH, 0, 0, this); @@ -76,6 +84,7 @@ public class DynamicScrollButton extends BasicArrowButton { g.drawImage(UIConstants.ARROW_WEST, 0, 0, this); break; } + SvgPaintUtils.afterPaint((Graphics2D) g); }