From 2d0a212718a23e9e393a0e6bbac3ffc7e69c78e0 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 5 May 2022 18:52:09 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-70446=20=E4=BA=A4=E4=BA=92=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/component/ProductNewsImagePanel.java | 2 +- .../fr/design/mainframe/alphafine/question/QuestionPane.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java index e87b6f199..dd1b3c483 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java @@ -56,7 +56,7 @@ public class ProductNewsImagePanel extends JPanel { } Set readSet = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getReadSet(); if (!readSet.contains(productNews.getId())) { - g2.drawImage(NEW_TIP_IMAGE, 0, 0, this); + g2.drawImage(NEW_TIP_IMAGE, 0, 0, (int) (NEW_TIP_IMAGE.getWidth(this) / SVGLoader.SYSTEM_SCALE), (int) (NEW_TIP_IMAGE.getHeight(this) / SVGLoader.SYSTEM_SCALE), this); } g2.setColor(BACKGROUND_COLOR); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java index 2726824b7..81617d0d8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java @@ -39,7 +39,9 @@ public class QuestionPane extends JPanel { } else { g2.drawImage(QUESTION_BACKGROUND_IMAGE, 0, 0, getWidth(), getHeight(), this); } - g2.drawImage(QUESTION_IMAGE, (getWidth() - QUESTION_IMAGE.getWidth(this)) / 2, (getHeight() - QUESTION_IMAGE.getHeight(this)) / 2, this); + int imageWidth = (int) (QUESTION_IMAGE.getWidth(this) / SVGLoader.SYSTEM_SCALE); + int imageHeight = (int) (QUESTION_IMAGE.getHeight(this) / SVGLoader.SYSTEM_SCALE); + g2.drawImage(QUESTION_IMAGE, (getWidth() - imageWidth) / 2, (getHeight() - imageHeight) / 2, imageWidth, imageHeight, this); }