mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-12 05:16:13 -04:00
fix(ui): 修复版本列表为空时显示的问题 (#3944)
This commit is contained in:
parent
5ab75b6a84
commit
f223d2bc41
@ -321,6 +321,14 @@ public final class MainPage extends StackPane implements DecoratorPage {
|
||||
}
|
||||
|
||||
private void onMenu() {
|
||||
if (menu.getContent().isEmpty()) {
|
||||
Label placeholder = new Label(i18n("version.empty"));
|
||||
placeholder.setStyle("-fx-padding: 10px; -fx-text-fill: gray; -fx-font-style: italic;");
|
||||
|
||||
popup.setPopupContent(placeholder);
|
||||
} else {
|
||||
popup.setPopupContent(menu);
|
||||
}
|
||||
popup.show(menuButton, JFXPopup.PopupVPosition.BOTTOM, JFXPopup.PopupHPosition.RIGHT, 0, -menuButton.getHeight());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user