feat: refine GameListPage UI.

This commit is contained in:
Yuhui Huang
2021-08-02 16:16:21 +08:00
parent 123c863e3d
commit 5da4ad7a62
3 changed files with 8 additions and 7 deletions

View File

@@ -69,7 +69,7 @@ public class GameListPage extends ListPageBase<GameListItem> implements Decorato
});
profileListItems = MappedObservableList.create(profilesProperty(), profile -> {
ProfileListItem item = new ProfileListItem(profile);
FXUtils.setLimitWidth(item, 300);
FXUtils.setLimitWidth(item, 200);
return item;
});
selectedProfile = createSelectedItemPropertyFor(profileListItems, Profile.class);
@@ -116,7 +116,7 @@ public class GameListPage extends ListPageBase<GameListItem> implements Decorato
{
BorderPane left = new BorderPane();
FXUtils.setLimitWidth(left, 300);
FXUtils.setLimitWidth(left, 200);
root.setLeft(left);
{
@@ -129,6 +129,7 @@ public class GameListPage extends ListPageBase<GameListItem> implements Decorato
ScrollPane pane = new ScrollPane();
VBox wrapper = new VBox();
wrapper.getStyleClass().add("advanced-list-box-content");
VBox box = new VBox();
Bindings.bindContent(box.getChildren(), profileListItems);
wrapper.getChildren().setAll(box, addProfileItem);
@@ -170,7 +171,7 @@ public class GameListPage extends ListPageBase<GameListItem> implements Decorato
.add(installModpackItem)
.add(refreshItem)
.add(globalManageItem);
FXUtils.setLimitHeight(bottomLeftCornerList, 40 * 4 + 18);
FXUtils.setLimitHeight(bottomLeftCornerList, 40 * 4 + 12 * 2);
left.setBottom(bottomLeftCornerList);
}
}
@@ -235,7 +236,7 @@ public class GameListPage extends ListPageBase<GameListItem> implements Decorato
public GameListSkin() {
super(GameList.this);
state.set(new State(i18n("version.manage"), null, true, false, true, false, 300));
state.set(new State(i18n("version.manage"), null, true, false, true, false, 200));
}
@Override

View File

@@ -332,7 +332,7 @@ public class VersionPage extends Control implements DecoratorPage {
.add(browseMenuItem)
.add(managementItem);
toolbar.getStyleClass().add("advanced-list-box-clear-padding");
FXUtils.setLimitHeight(toolbar, 40 * 4 + 18);
FXUtils.setLimitHeight(toolbar, 40 * 4 + 12 * 2);
left.setBottom(toolbar);
}

View File

@@ -127,7 +127,7 @@
}
.advanced-list-box-content {
-fx-padding: 18 0 0 0;
-fx-padding: 12 0 12 0;
-fx-spacing: 0;
}
@@ -774,7 +774,7 @@
}
.card {
-fx-background-color: WHITE;
-fx-background-color: rgba(255, 255, 255, 0.8);
-fx-background-radius: 4;
-fx-padding: 8px;
}