From fce46955fc4733ad34bf8e477ec4552c7711f5ec Mon Sep 17 00:00:00 2001 From: "Coral.Chen" Date: Wed, 23 Oct 2024 19:57:30 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-138379=20fix=EF=BC=9A=E6=A8=A1=E6=9D=BFw?= =?UTF-8?q?eb=E5=B1=9E=E6=80=A7=E6=97=A0=E6=B3=95=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/webattr/ToolBarButton.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java index c1efe6397f..211c5e0b9f 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java @@ -22,8 +22,6 @@ import javax.swing.ImageIcon; public class ToolBarButton extends UIButton implements MouseListener { private Widget widget; private WidgetOption no; - private final int ICON_WIDTH = FineUIScale.scale(16); - private final int ICON_HEIGHT = FineUIScale.scale(16); public ToolBarButton(Icon icon, Widget widget) { this(null, icon, widget); @@ -55,7 +53,7 @@ public class ToolBarButton extends UIButton implements MouseListener { if (icon instanceof ImageIcon) { //自定义上传的图标在设计器工具栏显示需要按照16*16进行缩放 Image originalImage = ((ImageIcon) icon).getImage(); - Image scaledImage = originalImage.getScaledInstance(ICON_WIDTH, ICON_HEIGHT, Image.SCALE_SMOOTH); + Image scaledImage = originalImage.getScaledInstance(FineUIScale.scale(16), FineUIScale.scale(16), Image.SCALE_SMOOTH); icon = new ImageIcon(scaledImage); } super.setIcon(icon);