为部分页面添加半透明背景遮罩 (#3730)

This commit is contained in:
Glavo
2025-03-09 13:02:00 +08:00
committed by GitHub
parent 57903da09b
commit ad71216bfc
2 changed files with 4 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ public final class AdvancedVersionSettingPage extends StackPane implements Decor
versionId == null ? i18n("settings.advanced") : i18n("settings.advanced.title", versionId) versionId == null ? i18n("settings.advanced") : i18n("settings.advanced.title", versionId)
)); ));
this.getStyleClass().add("gray-background");
ScrollPane scrollPane = new ScrollPane(); ScrollPane scrollPane = new ScrollPane();
scrollPane.setFitToHeight(true); scrollPane.setFitToHeight(true);
scrollPane.setFitToWidth(true); scrollPane.setFitToWidth(true);

View File

@@ -83,6 +83,8 @@ public final class WorldInfoPage extends SpinnerPane implements DecoratorPage {
this.world = world; this.world = world;
this.stateProperty = new SimpleObjectProperty<>(State.fromTitle(i18n("world.info.title", world.getWorldName()))); this.stateProperty = new SimpleObjectProperty<>(State.fromTitle(i18n("world.info.title", world.getWorldName())));
this.getStyleClass().add("gray-background");
this.setLoading(true); this.setLoading(true);
Task.supplyAsync(this::loadWorldInfo) Task.supplyAsync(this::loadWorldInfo)
.whenComplete(Schedulers.javafx(), ((result, exception) -> { .whenComplete(Schedulers.javafx(), ((result, exception) -> {