mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-18 08:16:58 -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();
|
||||
SpinnerPane spinnerRefresh = new SpinnerPane();
|
||||
spinnerRefresh.getStyleClass().setAll("small-spinner-pane");
|
||||
btnRefresh.setOnMouseClicked(e -> {
|
||||
spinnerRefresh.showSpinner();
|
||||
skinnable.refreshAsync()
|
||||
|
@ -36,6 +36,10 @@ public class SpinnerPane extends Control {
|
||||
private final BooleanProperty loading = new SimpleBooleanProperty(this, "loading");
|
||||
private final StringProperty failedReason = new SimpleStringProperty(this, "failedReason");
|
||||
|
||||
public SpinnerPane() {
|
||||
getStyleClass().add("spinner-pane");
|
||||
}
|
||||
|
||||
public void showSpinner() {
|
||||
setLoading(true);
|
||||
}
|
||||
@ -99,7 +103,6 @@ public class SpinnerPane extends Control {
|
||||
protected Skin(SpinnerPane control) {
|
||||
super(control);
|
||||
|
||||
root.getStyleClass().add("spinner-pane");
|
||||
topPane.getChildren().setAll(spinner);
|
||||
topPane.getStyleClass().add("notice-pane");
|
||||
failedPane.getChildren().setAll(failedReasonLabel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user