修复模组下载页面图标模糊的问题 (#4660)
This commit is contained in:
@@ -532,6 +532,9 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP
|
|||||||
container.setAlignment(Pos.CENTER_LEFT);
|
container.setAlignment(Pos.CENTER_LEFT);
|
||||||
pane.getChildren().add(container);
|
pane.getChildren().add(container);
|
||||||
|
|
||||||
|
imageView.setFitWidth(40);
|
||||||
|
imageView.setFitHeight(40);
|
||||||
|
|
||||||
container.getChildren().setAll(FXUtils.limitingSize(imageView, 40, 40), content);
|
container.getChildren().setAll(FXUtils.limitingSize(imageView, 40, 40), content);
|
||||||
HBox.setHgrow(content, Priority.ALWAYS);
|
HBox.setHgrow(content, Priority.ALWAYS);
|
||||||
}
|
}
|
||||||
@@ -547,7 +550,7 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP
|
|||||||
.map(category -> getSkinnable().getLocalizedCategory(category))
|
.map(category -> getSkinnable().getLocalizedCategory(category))
|
||||||
.forEach(content::addTag);
|
.forEach(content::addTag);
|
||||||
if (StringUtils.isNotBlank(dataItem.getIconUrl())) {
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -219,8 +219,10 @@ public class DownloadPage extends Control implements DecoratorPage {
|
|||||||
BorderPane.setMargin(descriptionPane, new Insets(11, 11, 0, 11));
|
BorderPane.setMargin(descriptionPane, new Insets(11, 11, 0, 11));
|
||||||
{
|
{
|
||||||
ImageView imageView = new ImageView();
|
ImageView imageView = new ImageView();
|
||||||
|
imageView.setFitWidth(40);
|
||||||
|
imageView.setFitHeight(40);
|
||||||
if (StringUtils.isNotBlank(getSkinnable().addon.getIconUrl())) {
|
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));
|
descriptionPane.getChildren().add(FXUtils.limitingSize(imageView, 40, 40));
|
||||||
|
|
||||||
@@ -341,6 +343,8 @@ public class DownloadPage extends Control implements DecoratorPage {
|
|||||||
TwoLineListItem content = new TwoLineListItem();
|
TwoLineListItem content = new TwoLineListItem();
|
||||||
HBox.setHgrow(content, Priority.ALWAYS);
|
HBox.setHgrow(content, Priority.ALWAYS);
|
||||||
ImageView imageView = new ImageView();
|
ImageView imageView = new ImageView();
|
||||||
|
imageView.setFitWidth(40);
|
||||||
|
imageView.setFitHeight(40);
|
||||||
pane.getChildren().setAll(FXUtils.limitingSize(imageView, 40, 40), content);
|
pane.getChildren().setAll(FXUtils.limitingSize(imageView, 40, 40), content);
|
||||||
|
|
||||||
RipplerContainer container = new RipplerContainer(pane);
|
RipplerContainer container = new RipplerContainer(pane);
|
||||||
@@ -358,12 +362,12 @@ public class DownloadPage extends Control implements DecoratorPage {
|
|||||||
.map(page::getLocalizedCategory)
|
.map(page::getLocalizedCategory)
|
||||||
.forEach(content::addTag);
|
.forEach(content::addTag);
|
||||||
if (StringUtils.isNotBlank(addon.getIconUrl())) {
|
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 {
|
} else {
|
||||||
content.setTitle(i18n("mods.broken_dependency.title"));
|
content.setTitle(i18n("mods.broken_dependency.title"));
|
||||||
content.setSubtitle(i18n("mods.broken_dependency.desc"));
|
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"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user