alt: version page look
This commit is contained in:
@@ -20,6 +20,7 @@ package org.jackhuang.hmcl.ui.account;
|
|||||||
import com.jfoenix.controls.JFXButton;
|
import com.jfoenix.controls.JFXButton;
|
||||||
import com.jfoenix.controls.JFXRadioButton;
|
import com.jfoenix.controls.JFXRadioButton;
|
||||||
import com.jfoenix.effects.JFXDepthManager;
|
import com.jfoenix.effects.JFXDepthManager;
|
||||||
|
import javafx.geometry.Insets;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.SkinBase;
|
import javafx.scene.control.SkinBase;
|
||||||
@@ -100,7 +101,8 @@ public class AccountListItemSkin extends SkinBase<AccountListItem> {
|
|||||||
right.getChildren().add(btnRemove);
|
right.getChildren().add(btnRemove);
|
||||||
root.setRight(right);
|
root.setRight(right);
|
||||||
|
|
||||||
root.setStyle("-fx-background-color: white; -fx-background-radius: 4; -fx-padding: 8 8 8 0;");
|
root.getStyleClass().add("card");
|
||||||
|
root.setPadding(new Insets(8, 8, 8, 0));
|
||||||
JFXDepthManager.setDepth(root, 1);
|
JFXDepthManager.setDepth(root, 1);
|
||||||
|
|
||||||
getChildren().setAll(root);
|
getChildren().setAll(root);
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import javafx.collections.ObservableList;
|
|||||||
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorServer;
|
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorServer;
|
||||||
import org.jackhuang.hmcl.ui.Controllers;
|
import org.jackhuang.hmcl.ui.Controllers;
|
||||||
import org.jackhuang.hmcl.ui.ListPage;
|
import org.jackhuang.hmcl.ui.ListPage;
|
||||||
import org.jackhuang.hmcl.ui.construct.Navigator;
|
|
||||||
import org.jackhuang.hmcl.ui.decorator.DecoratorPage;
|
import org.jackhuang.hmcl.ui.decorator.DecoratorPage;
|
||||||
import org.jackhuang.hmcl.util.javafx.MappedObservableList;
|
import org.jackhuang.hmcl.util.javafx.MappedObservableList;
|
||||||
|
|
||||||
@@ -38,7 +37,6 @@ public class AuthlibInjectorServersPage extends ListPage<AuthlibInjectorServerIt
|
|||||||
public AuthlibInjectorServersPage() {
|
public AuthlibInjectorServersPage() {
|
||||||
serverItems = MappedObservableList.create(config().getAuthlibInjectorServers(), this::createServerItem);
|
serverItems = MappedObservableList.create(config().getAuthlibInjectorServers(), this::createServerItem);
|
||||||
Bindings.bindContent(itemsProperty(), serverItems);
|
Bindings.bindContent(itemsProperty(), serverItems);
|
||||||
addEventHandler(Navigator.NavigationEvent.NAVIGATED, this::onDecoratorPageNavigating);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private AuthlibInjectorServerItem createServerItem(AuthlibInjectorServer server) {
|
private AuthlibInjectorServerItem createServerItem(AuthlibInjectorServer server) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public abstract class FloatListCell<T> extends ListCell<T> {
|
|||||||
setText(null);
|
setText(null);
|
||||||
setGraphic(null);
|
setGraphic(null);
|
||||||
|
|
||||||
pane.setStyle("-fx-background-color: white");
|
pane.getStyleClass().add("card");
|
||||||
pane.setCursor(Cursor.HAND);
|
pane.setCursor(Cursor.HAND);
|
||||||
pane.setPadding(new Insets(8));
|
pane.setPadding(new Insets(8));
|
||||||
setPadding(new Insets(5));
|
setPadding(new Insets(5));
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public abstract class SettingsView extends StackPane {
|
|||||||
|
|
||||||
{
|
{
|
||||||
VBox rootPane = new VBox();
|
VBox rootPane = new VBox();
|
||||||
rootPane.setPadding(new Insets(36, 18, 36, 18));
|
rootPane.setPadding(new Insets(32, 10, 32, 10));
|
||||||
{
|
{
|
||||||
ComponentList settingsPane = new ComponentList();
|
ComponentList settingsPane = new ComponentList();
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package org.jackhuang.hmcl.ui.profile;
|
|||||||
import com.jfoenix.controls.JFXButton;
|
import com.jfoenix.controls.JFXButton;
|
||||||
import com.jfoenix.controls.JFXRadioButton;
|
import com.jfoenix.controls.JFXRadioButton;
|
||||||
import com.jfoenix.effects.JFXDepthManager;
|
import com.jfoenix.effects.JFXDepthManager;
|
||||||
|
import javafx.geometry.Insets;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.SkinBase;
|
import javafx.scene.control.SkinBase;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
@@ -73,7 +74,8 @@ public class ProfileListItemSkin extends SkinBase<ProfileListItem> {
|
|||||||
right.getChildren().add(btnRemove);
|
right.getChildren().add(btnRemove);
|
||||||
root.setRight(right);
|
root.setRight(right);
|
||||||
|
|
||||||
root.setStyle("-fx-background-color: white; -fx-background-radius: 4; -fx-padding: 8 8 8 0;");
|
root.getStyleClass().add("card");
|
||||||
|
root.setPadding(new Insets(8, 8, 8, 0));
|
||||||
JFXDepthManager.setDepth(root, 1);
|
JFXDepthManager.setDepth(root, 1);
|
||||||
item.titleProperty().bind(skinnable.titleProperty());
|
item.titleProperty().bind(skinnable.titleProperty());
|
||||||
item.subtitleProperty().bind(skinnable.subtitleProperty());
|
item.subtitleProperty().bind(skinnable.subtitleProperty());
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.jfoenix.controls.JFXButton;
|
|||||||
import com.jfoenix.controls.JFXPopup;
|
import com.jfoenix.controls.JFXPopup;
|
||||||
import com.jfoenix.controls.JFXRadioButton;
|
import com.jfoenix.controls.JFXRadioButton;
|
||||||
import com.jfoenix.effects.JFXDepthManager;
|
import com.jfoenix.effects.JFXDepthManager;
|
||||||
|
import javafx.geometry.Insets;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.Cursor;
|
import javafx.scene.Cursor;
|
||||||
import javafx.scene.control.SkinBase;
|
import javafx.scene.control.SkinBase;
|
||||||
@@ -91,7 +92,8 @@ public class GameListItemSkin extends SkinBase<GameListItem> {
|
|||||||
right.getChildren().add(btnManage);
|
right.getChildren().add(btnManage);
|
||||||
root.setRight(right);
|
root.setRight(right);
|
||||||
|
|
||||||
root.setStyle("-fx-background-color: white; -fx-background-radius: 4; -fx-padding: 8 8 8 0;");
|
root.getStyleClass().add("card");
|
||||||
|
root.setPadding(new Insets(8, 8, 8, 0));
|
||||||
JFXDepthManager.setDepth(root, 1);
|
JFXDepthManager.setDepth(root, 1);
|
||||||
|
|
||||||
getChildren().setAll(root);
|
getChildren().setAll(root);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.jfoenix.controls.JFXListView;
|
|||||||
import com.jfoenix.controls.JFXPopup;
|
import com.jfoenix.controls.JFXPopup;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.property.*;
|
import javafx.beans.property.*;
|
||||||
|
import javafx.geometry.Insets;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.Control;
|
import javafx.scene.control.Control;
|
||||||
import javafx.scene.control.SelectionMode;
|
import javafx.scene.control.SelectionMode;
|
||||||
@@ -182,24 +183,17 @@ public class VersionPage extends Control implements DecoratorPage {
|
|||||||
|
|
||||||
// the root page, with the sidebar in left, navigator in center.
|
// the root page, with the sidebar in left, navigator in center.
|
||||||
BorderPane root = new BorderPane();
|
BorderPane root = new BorderPane();
|
||||||
root.getStyleClass().add("gray-background");
|
|
||||||
|
|
||||||
{
|
{
|
||||||
BorderPane leftRootPane = new BorderPane();
|
|
||||||
FXUtils.setLimitWidth(leftRootPane, 200);
|
|
||||||
|
|
||||||
StackPane drawerContainer = new StackPane();
|
StackPane drawerContainer = new StackPane();
|
||||||
|
FXUtils.setLimitWidth(drawerContainer, 200);
|
||||||
|
drawerContainer.getStyleClass().add("gray-background");
|
||||||
drawerContainer.getChildren().setAll(control.listView);
|
drawerContainer.getChildren().setAll(control.listView);
|
||||||
leftRootPane.setCenter(drawerContainer);
|
FXUtils.setOverflowHidden(drawerContainer, 8);
|
||||||
|
|
||||||
Rectangle separator = new Rectangle();
|
StackPane wrapper = new StackPane(drawerContainer);
|
||||||
separator.heightProperty().bind(root.heightProperty());
|
wrapper.setPadding(new Insets(4, 0, 4, 4));
|
||||||
separator.setWidth(1);
|
root.setLeft(wrapper);
|
||||||
separator.setFill(Color.GRAY);
|
|
||||||
|
|
||||||
leftRootPane.setRight(separator);
|
|
||||||
|
|
||||||
root.setLeft(leftRootPane);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TabHeader tabPane = new TabHeader();
|
TabHeader tabPane = new TabHeader();
|
||||||
@@ -277,7 +271,11 @@ public class VersionPage extends Control implements DecoratorPage {
|
|||||||
titleBar.setRight(toolBar);
|
titleBar.setRight(toolBar);
|
||||||
control.state.set(new State(i18n("version.manage.manage"), titleBar, true, false, true));
|
control.state.set(new State(i18n("version.manage.manage"), titleBar, true, false, true));
|
||||||
|
|
||||||
root.setCenter(control.transitionPane);
|
control.transitionPane.getStyleClass().add("gray-background");
|
||||||
|
FXUtils.setOverflowHidden(control.transitionPane, 8);
|
||||||
|
StackPane wrapper = new StackPane(control.transitionPane);
|
||||||
|
wrapper.setPadding(new Insets(4));
|
||||||
|
root.setCenter(wrapper);
|
||||||
|
|
||||||
spinnerPane.loadingProperty().bind(control.loading);
|
spinnerPane.loadingProperty().bind(control.loading);
|
||||||
spinnerPane.setContent(root);
|
spinnerPane.setContent(root);
|
||||||
|
|||||||
@@ -270,6 +270,7 @@
|
|||||||
|
|
||||||
.jfx-popup-container {
|
.jfx-popup-container {
|
||||||
-fx-background-color: WHITE;
|
-fx-background-color: WHITE;
|
||||||
|
-fx-background-radius: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-list-view {
|
.popup-list-view {
|
||||||
@@ -680,7 +681,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 5, 0.06, -0.5, 1);
|
-fx-background-color: WHITE;
|
||||||
|
-fx-background-radius: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.options-sublist {
|
.options-sublist {
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
<BorderPane>
|
<BorderPane>
|
||||||
<center>
|
<center>
|
||||||
<VBox fx:id="list" spacing="8">
|
<VBox fx:id="list" spacing="8">
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT" style="-fx-background-color: white; -fx-padding: 20 8 20 16">
|
<HBox spacing="8" alignment="CENTER_LEFT" styleClass="card" style="-fx-padding: 20 8 20 16">
|
||||||
<Label text="%archive.name" />
|
<Label text="%archive.name" />
|
||||||
<JFXTextField fx:id="txtName" maxWidth="300"/>
|
<JFXTextField fx:id="txtName" maxWidth="300"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
<BorderPane fx:id="btnGame" style="-fx-background-color: white; -fx-padding: 8">
|
<BorderPane fx:id="btnGame" styleClass="card" style="-fx-padding: 8">
|
||||||
<left>
|
<left>
|
||||||
<ImageView>
|
<ImageView>
|
||||||
<Image url="/assets/img/grass.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
<Image url="/assets/img/grass.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<Label fx:id="lblGame" BorderPane.alignment="CENTER_LEFT" />
|
<Label fx:id="lblGame" BorderPane.alignment="CENTER_LEFT" />
|
||||||
</center>
|
</center>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
<BorderPane fx:id="btnFabric" style="-fx-background-color: white; -fx-padding: 8; -fx-cursor: HAND">
|
<BorderPane fx:id="btnFabric" styleClass="card" style="-fx-padding: 8; -fx-cursor: HAND">
|
||||||
<left>
|
<left>
|
||||||
<ImageView>
|
<ImageView>
|
||||||
<Image url="/assets/img/fabric.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
<Image url="/assets/img/fabric.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<fx:include BorderPane.alignment="CENTER_RIGHT" source="/assets/svg/arrow-right.fxml"/>
|
<fx:include BorderPane.alignment="CENTER_RIGHT" source="/assets/svg/arrow-right.fxml"/>
|
||||||
</right>
|
</right>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
<BorderPane fx:id="btnForge" style="-fx-background-color: white; -fx-padding: 8; -fx-cursor: HAND">
|
<BorderPane fx:id="btnForge" styleClass="card" style="-fx-padding: 8; -fx-cursor: HAND">
|
||||||
<left>
|
<left>
|
||||||
<ImageView>
|
<ImageView>
|
||||||
<Image url="/assets/img/forge.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
<Image url="/assets/img/forge.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<fx:include BorderPane.alignment="CENTER_RIGHT" source="/assets/svg/arrow-right.fxml"/>
|
<fx:include BorderPane.alignment="CENTER_RIGHT" source="/assets/svg/arrow-right.fxml"/>
|
||||||
</right>
|
</right>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
<BorderPane fx:id="btnLiteLoader" style="-fx-background-color: white; -fx-padding: 8; -fx-cursor: HAND">
|
<BorderPane fx:id="btnLiteLoader" styleClass="card" style="-fx-padding: 8; -fx-cursor: HAND">
|
||||||
<left>
|
<left>
|
||||||
<ImageView>
|
<ImageView>
|
||||||
<Image url="/assets/img/chicken.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
<Image url="/assets/img/chicken.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<fx:include BorderPane.alignment="CENTER_RIGHT" source="/assets/svg/arrow-right.fxml"/>
|
<fx:include BorderPane.alignment="CENTER_RIGHT" source="/assets/svg/arrow-right.fxml"/>
|
||||||
</right>
|
</right>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
<BorderPane fx:id="btnOptiFine" style="-fx-background-color: white; -fx-padding: 8; -fx-cursor: HAND">
|
<BorderPane fx:id="btnOptiFine" styleClass="card" style="-fx-padding: 8; -fx-cursor: HAND">
|
||||||
<left>
|
<left>
|
||||||
<ImageView>
|
<ImageView>
|
||||||
<Image url="/assets/img/command.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
<Image url="/assets/img/command.png" requestedHeight="32" requestedWidth="32" smooth="true" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
xmlns:fx="http://javafx.com/fxml"
|
xmlns:fx="http://javafx.com/fxml"
|
||||||
type="StackPane">
|
type="StackPane">
|
||||||
<ScrollPane fx:id="scroll" fitToHeight="true" fitToWidth="true" vbarPolicy="ALWAYS">
|
<ScrollPane fx:id="scroll" fitToHeight="true" fitToWidth="true" vbarPolicy="ALWAYS">
|
||||||
<VBox fx:id="rootPane" style="-fx-padding: 20;" spacing="12">
|
<VBox fx:id="rootPane" style="-fx-padding: 10;" spacing="12">
|
||||||
|
|
||||||
<ComponentList fx:id="iconPickerItemWrapper">
|
<ComponentList fx:id="iconPickerItemWrapper">
|
||||||
<ImagePickerItem fx:id="iconPickerItem" title="%settings.icon" onSelectButtonClicked="#onExploreIcon" onDeleteButtonClicked="#onDeleteIcon">
|
<ImagePickerItem fx:id="iconPickerItem" title="%settings.icon" onSelectButtonClicked="#onExploreIcon" onDeleteButtonClicked="#onDeleteIcon">
|
||||||
|
|||||||
Reference in New Issue
Block a user