Browse Source

REPORT-92440 mac-数据源带叹号的宽度不正常

newui
obo 2 years ago
parent
commit
3e253a43a7
  1. 6
      designer-realize/src/main/java/com/fr/design/cell/bar/DynamicScrollButton.java
  2. 11
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java
  3. 9
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java

6
designer-realize/src/main/java/com/fr/design/cell/bar/DynamicScrollButton.java

@ -1,7 +1,7 @@
package com.fr.design.cell.bar;
import com.fr.design.constants.UIConstants;
import com.fr.design.utils.SvgPaintUtils;
import com.fr.design.utils.SvgDrawUtils;
import com.fr.general.ComparatorUtils;
import javax.swing.SwingConstants;
@ -69,7 +69,7 @@ public class DynamicScrollButton extends BasicArrowButton {
private void paintArrow(Graphics g, Dimension size) {
SvgPaintUtils.beforePaint((Graphics2D) g);
SvgDrawUtils.beforeDraw((Graphics2D) g);
switch (direction) {
case SwingConstants.NORTH:
g.drawImage(UIConstants.ARROW_NORTH, 0, 0, this);
@ -84,7 +84,7 @@ public class DynamicScrollButton extends BasicArrowButton {
g.drawImage(UIConstants.ARROW_WEST, 0, 0, this);
break;
}
SvgPaintUtils.afterPaint((Graphics2D) g);
SvgDrawUtils.afterDraw((Graphics2D) g);
}

11
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java

@ -2,19 +2,18 @@ package com.fr.design.mainframe.alphafine.component;
import com.fr.base.GraphHelper;
import com.fr.base.svg.SVGLoader;
import com.fr.base.svg.SystemScaleUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.alphafine.model.ProductNews;
import com.fr.design.utils.SvgPaintUtils;
import com.fr.design.utils.SvgDrawUtils;
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.util.Set;
import javax.swing.JPanel;
/**
* @author hades
@ -58,9 +57,9 @@ public class ProductNewsImagePanel extends JPanel {
}
Set<Long> readSet = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getReadSet();
if (!readSet.contains(productNews.getId())) {
SvgPaintUtils.beforePaint(g2);
SvgDrawUtils.beforeDraw(g2);
g2.drawImage(NEW_TIP_IMAGE, 0, 0, this);
SvgPaintUtils.afterPaint(g2);
SvgDrawUtils.afterDraw(g2);
}
g2.setColor(BACKGROUND_COLOR);

9
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java

@ -4,13 +4,14 @@ import com.fr.base.svg.SVGLoader;
import com.fr.base.svg.SystemScaleUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.alphafine.AlphaFineUtil;
import com.fr.design.utils.SvgPaintUtils;
import com.fr.design.utils.SvgDrawUtils;
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import javax.swing.JPanel;
/**
* @author hades
@ -33,7 +34,7 @@ public class QuestionPane extends JPanel {
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
SvgPaintUtils.beforePaint(g2);
SvgDrawUtils.beforeDraw(g2);
// 宽高保持
int width = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getWidth() * SVGLoader.SYSTEM_SCALE) : getWidth();
int height = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getHeight() * SVGLoader.SYSTEM_SCALE) : getHeight();
@ -47,7 +48,7 @@ public class QuestionPane extends JPanel {
int imageWidth = QUESTION_IMAGE.getWidth(this);
int imageHeight = QUESTION_IMAGE.getHeight(this);
g2.drawImage(QUESTION_IMAGE, (width - imageWidth) / 2 - 2, (height - imageHeight) / 2 - 2,this);
SvgPaintUtils.afterPaint(g2);
SvgDrawUtils.afterDraw(g2);
}

Loading…
Cancel
Save