mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-15 06:45:42 -04:00
alt: make modpack selection page more readable
This commit is contained in:
parent
6857200d75
commit
4f51ab00a1
@ -18,6 +18,7 @@
|
|||||||
package org.jackhuang.hmcl.ui.download;
|
package org.jackhuang.hmcl.ui.download;
|
||||||
|
|
||||||
import com.jfoenix.controls.JFXButton;
|
import com.jfoenix.controls.JFXButton;
|
||||||
|
import com.jfoenix.effects.JFXDepthManager;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
@ -56,6 +57,9 @@ public final class ModpackSelectionPage extends StackPane implements WizardPage
|
|||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
FXUtils.loadFXML(this, "/assets/fxml/download/modpack-source.fxml");
|
FXUtils.loadFXML(this, "/assets/fxml/download/modpack-source.fxml");
|
||||||
|
|
||||||
|
JFXDepthManager.setDepth(btnLocal, 1);
|
||||||
|
JFXDepthManager.setDepth(btnRemote, 1);
|
||||||
|
|
||||||
Optional<File> filePath = tryCast(controller.getSettings().get(MODPACK_FILE), File.class);
|
Optional<File> filePath = tryCast(controller.getSettings().get(MODPACK_FILE), File.class);
|
||||||
if (filePath.isPresent()) {
|
if (filePath.isPresent()) {
|
||||||
controller.getSettings().put(MODPACK_FILE, filePath.get());
|
controller.getSettings().put(MODPACK_FILE, filePath.get());
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
<fx:define>
|
<fx:define>
|
||||||
<Insets fx:id="insets" topRightBottomLeft="8" />
|
<Insets fx:id="insets" topRightBottomLeft="8" />
|
||||||
</fx:define>
|
</fx:define>
|
||||||
<VBox fx:id="list" styleClass="jfx-list-view" maxHeight="150" maxWidth="400">
|
<VBox fx:id="list" styleClass="jfx-list-view" maxHeight="150" spacing="8" maxWidth="400">
|
||||||
<Label padding="${insets}" text="%install.modpack" />
|
<Label padding="${insets}" text="%install.modpack" />
|
||||||
<JFXButton fx:id="btnLocal" prefWidth="${list.width}" onMouseClicked="#onChooseLocalFile">
|
<JFXButton fx:id="btnLocal" styleClass="card" style="-fx-padding: 8; -fx-cursor: HAND" prefWidth="${list.width}" onMouseClicked="#onChooseLocalFile">
|
||||||
<graphic>
|
<graphic>
|
||||||
<BorderPane mouseTransparent="true">
|
<BorderPane mouseTransparent="true">
|
||||||
<left>
|
<left>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
</BorderPane>
|
</BorderPane>
|
||||||
</graphic>
|
</graphic>
|
||||||
</JFXButton>
|
</JFXButton>
|
||||||
<JFXButton fx:id="btnRemote" prefWidth="${list.width}" onMouseClicked="#onChooseRemoteFile">
|
<JFXButton fx:id="btnRemote" styleClass="card" style="-fx-padding: 8; -fx-cursor: HAND" prefWidth="${list.width}" onMouseClicked="#onChooseRemoteFile">
|
||||||
<graphic>
|
<graphic>
|
||||||
<BorderPane mouseTransparent="true">
|
<BorderPane mouseTransparent="true">
|
||||||
<left>
|
<left>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user