Browse Source

REPORT-92439 mac下-展开收起图标的问题

release/11.0
obo 2 years ago
parent
commit
3b09ea22b3
  1. 4
      designer-base/src/main/java/com/fr/base/svg/SVGIcon.java
  2. 4
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  3. 12
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java
  4. 4
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

4
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);

4
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));
}
}
}

12
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);

4
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));
}
}

Loading…
Cancel
Save