From 58b357d4b86e7bca56b8ceb269f78d46cb7fb39c Mon Sep 17 00:00:00 2001 From: Glavo Date: Sun, 12 Oct 2025 21:14:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=A1=E7=BB=84=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E9=A1=B5=E9=9D=A2=E5=9B=BE=E6=A0=87=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#4660)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jackhuang/hmcl/ui/versions/DownloadListPage.java | 5 ++++- .../org/jackhuang/hmcl/ui/versions/DownloadPage.java | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java index cc5aceeef..4a679ed30 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java @@ -532,6 +532,9 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP container.setAlignment(Pos.CENTER_LEFT); pane.getChildren().add(container); + imageView.setFitWidth(40); + imageView.setFitHeight(40); + container.getChildren().setAll(FXUtils.limitingSize(imageView, 40, 40), content); HBox.setHgrow(content, Priority.ALWAYS); } @@ -547,7 +550,7 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP .map(category -> getSkinnable().getLocalizedCategory(category)) .forEach(content::addTag); if (StringUtils.isNotBlank(dataItem.getIconUrl())) { - imageView.imageProperty().bind(FXUtils.newRemoteImage(dataItem.getIconUrl(), 40, 40, true, true)); + imageView.imageProperty().bind(FXUtils.newRemoteImage(dataItem.getIconUrl(), 80, 80, true, true)); } } }); diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java index 614b991ab..c62da41ee 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java @@ -219,8 +219,10 @@ public class DownloadPage extends Control implements DecoratorPage { BorderPane.setMargin(descriptionPane, new Insets(11, 11, 0, 11)); { ImageView imageView = new ImageView(); + imageView.setFitWidth(40); + imageView.setFitHeight(40); if (StringUtils.isNotBlank(getSkinnable().addon.getIconUrl())) { - imageView.imageProperty().bind(FXUtils.newRemoteImage(getSkinnable().addon.getIconUrl(), 40, 40, true, true)); + imageView.imageProperty().bind(FXUtils.newRemoteImage(getSkinnable().addon.getIconUrl(), 80, 80, true, true)); } descriptionPane.getChildren().add(FXUtils.limitingSize(imageView, 40, 40)); @@ -341,6 +343,8 @@ public class DownloadPage extends Control implements DecoratorPage { TwoLineListItem content = new TwoLineListItem(); HBox.setHgrow(content, Priority.ALWAYS); ImageView imageView = new ImageView(); + imageView.setFitWidth(40); + imageView.setFitHeight(40); pane.getChildren().setAll(FXUtils.limitingSize(imageView, 40, 40), content); RipplerContainer container = new RipplerContainer(pane); @@ -358,12 +362,12 @@ public class DownloadPage extends Control implements DecoratorPage { .map(page::getLocalizedCategory) .forEach(content::addTag); if (StringUtils.isNotBlank(addon.getIconUrl())) { - imageView.imageProperty().bind(FXUtils.newRemoteImage(addon.getIconUrl(), 40, 40, true, true)); + imageView.imageProperty().bind(FXUtils.newRemoteImage(addon.getIconUrl(), 80, 80, true, true)); } } else { content.setTitle(i18n("mods.broken_dependency.title")); content.setSubtitle(i18n("mods.broken_dependency.desc")); - imageView.setImage(FXUtils.newBuiltinImage("/assets/img/icon@8x.png", 40, 40, true, true)); + imageView.setImage(FXUtils.newBuiltinImage("/assets/img/icon@4x.png")); } } }