mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-16 23:37:14 -04:00
FIx: too large spinner in accountlistitem. Closes #999.
This commit is contained in:
parent
723f216e6b
commit
c11d947099
@ -90,6 +90,7 @@ public class AccountListItemSkin extends SkinBase<AccountListItem> {
|
|||||||
|
|
||||||
JFXButton btnRefresh = new JFXButton();
|
JFXButton btnRefresh = new JFXButton();
|
||||||
SpinnerPane spinnerRefresh = new SpinnerPane();
|
SpinnerPane spinnerRefresh = new SpinnerPane();
|
||||||
|
spinnerRefresh.getStyleClass().setAll("small-spinner-pane");
|
||||||
btnRefresh.setOnMouseClicked(e -> {
|
btnRefresh.setOnMouseClicked(e -> {
|
||||||
spinnerRefresh.showSpinner();
|
spinnerRefresh.showSpinner();
|
||||||
skinnable.refreshAsync()
|
skinnable.refreshAsync()
|
||||||
|
@ -36,6 +36,10 @@ public class SpinnerPane extends Control {
|
|||||||
private final BooleanProperty loading = new SimpleBooleanProperty(this, "loading");
|
private final BooleanProperty loading = new SimpleBooleanProperty(this, "loading");
|
||||||
private final StringProperty failedReason = new SimpleStringProperty(this, "failedReason");
|
private final StringProperty failedReason = new SimpleStringProperty(this, "failedReason");
|
||||||
|
|
||||||
|
public SpinnerPane() {
|
||||||
|
getStyleClass().add("spinner-pane");
|
||||||
|
}
|
||||||
|
|
||||||
public void showSpinner() {
|
public void showSpinner() {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
}
|
}
|
||||||
@ -99,7 +103,6 @@ public class SpinnerPane extends Control {
|
|||||||
protected Skin(SpinnerPane control) {
|
protected Skin(SpinnerPane control) {
|
||||||
super(control);
|
super(control);
|
||||||
|
|
||||||
root.getStyleClass().add("spinner-pane");
|
|
||||||
topPane.getChildren().setAll(spinner);
|
topPane.getChildren().setAll(spinner);
|
||||||
topPane.getStyleClass().add("notice-pane");
|
topPane.getStyleClass().add("notice-pane");
|
||||||
failedPane.getChildren().setAll(failedReasonLabel);
|
failedPane.getChildren().setAll(failedReasonLabel);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user