Skip to content

Commit 6f5ab17

Browse files
neveler3gf8jv4dv
authored andcommitted
为不同类型的 Dialog 指定相应的默认标题 (#5079)
1 parent f03a4ff commit 6f5ab17

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/MessageDialogPane.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public MessageDialogPane(@NotNull String text, @Nullable String title, @NotNull
9898
{
9999
StackPane titlePane = new StackPane();
100100
titlePane.getStyleClass().addAll("jfx-layout-heading", "title");
101-
titlePane.getChildren().setAll(new Label(title != null ? title : i18n("message.info")));
101+
titlePane.getChildren().setAll(new Label(title != null ? title : i18n(type.getDisplayName())));
102102

103103
StackPane content = new StackPane();
104104
content.getStyleClass().add("jfx-layout-body");

HMCL/src/main/resources/assets/lang/I18N.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,7 @@ message.info=Information
864864
message.success=Operation successfully completed
865865
message.unknown=Unknown
866866
message.warning=Warning
867+
message.question=Question
867868

868869
modpack=Modpacks
869870
modpack.choose=Choose Modpack

0 commit comments

Comments
 (0)