From cce17edaa6adb12942150f80d5187abc538339c2 Mon Sep 17 00:00:00 2001 From: 3gf8jv4dv <3gf8jv4dv@gmail.com> Date: Tue, 15 Oct 2024 01:24:44 +0800 Subject: [PATCH] Capitalize text above the sidebar line (#3336) --- .../java/org/jackhuang/hmcl/ui/account/AccountListPage.java | 3 ++- .../java/org/jackhuang/hmcl/ui/download/DownloadPage.java | 5 +++-- .../org/jackhuang/hmcl/ui/main/LauncherSettingsPage.java | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListPage.java index 253ca699b..ae970c864 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListPage.java @@ -44,6 +44,7 @@ import org.jackhuang.hmcl.util.javafx.BindingMapping; import org.jackhuang.hmcl.util.javafx.MappedObservableList; import java.net.URI; +import java.util.Locale; import static org.jackhuang.hmcl.ui.versions.VersionPage.wrap; import static org.jackhuang.hmcl.util.logging.Logger.LOG; @@ -95,7 +96,7 @@ public class AccountListPage extends DecoratorAnimatedPage implements DecoratorP VBox boxMethods = new VBox(); { boxMethods.getStyleClass().add("advanced-list-box-content"); - boxMethods.getChildren().add(new ClassTitle(i18n("account.create"))); + boxMethods.getChildren().add(new ClassTitle(i18n("account.create").toUpperCase(Locale.ROOT))); FXUtils.setLimitWidth(boxMethods, 200); AdvancedListItem offlineItem = new AdvancedListItem(); diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/DownloadPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/DownloadPage.java index 20a0692bd..7b8e89486 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/DownloadPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/DownloadPage.java @@ -55,6 +55,7 @@ import org.jetbrains.annotations.Nullable; import java.nio.file.Path; import java.util.HashMap; import java.util.Map; +import java.util.Locale; import java.util.concurrent.CancellationException; import java.util.function.Supplier; @@ -101,7 +102,7 @@ public class DownloadPage extends DecoratorAnimatedPage implements DecoratorPage { AdvancedListBox sideBar = new AdvancedListBox() - .startCategory(i18n("download.game")) + .startCategory(i18n("download.game").toUpperCase(Locale.ROOT)) .addNavigationDrawerItem(item -> { item.setTitle(i18n("game")); item.setLeftGraphic(wrap(SVG.GAMEPAD)); @@ -114,7 +115,7 @@ public class DownloadPage extends DecoratorAnimatedPage implements DecoratorPage settingsItem.activeProperty().bind(tab.getSelectionModel().selectedItemProperty().isEqualTo(modpackTab)); settingsItem.setOnAction(e -> tab.select(modpackTab)); }) - .startCategory(i18n("download.content")) + .startCategory(i18n("download.content").toUpperCase(Locale.ROOT)) .addNavigationDrawerItem(item -> { item.setTitle(i18n("mods")); item.setLeftGraphic(wrap(SVG.PUZZLE)); diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/main/LauncherSettingsPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/main/LauncherSettingsPage.java index 155459d37..b9395c07d 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/main/LauncherSettingsPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/main/LauncherSettingsPage.java @@ -33,6 +33,8 @@ import org.jackhuang.hmcl.ui.decorator.DecoratorAnimatedPage; import org.jackhuang.hmcl.ui.decorator.DecoratorPage; import org.jackhuang.hmcl.ui.versions.VersionSettingsPage; +import java.util.Locale; + import static org.jackhuang.hmcl.ui.versions.VersionPage.wrap; import static org.jackhuang.hmcl.ui.FXUtils.runInFX; import static org.jackhuang.hmcl.util.i18n.I18n.i18n; @@ -83,7 +85,7 @@ public class LauncherSettingsPage extends DecoratorAnimatedPage implements Decor javaItem.activeProperty().bind(tab.getSelectionModel().selectedItemProperty().isEqualTo(javaManagementTab)); javaItem.setOnAction(e -> tab.select(javaManagementTab)); }) - .startCategory(i18n("launcher")) + .startCategory(i18n("launcher").toUpperCase(Locale.ROOT)) .addNavigationDrawerItem(settingsItem -> { settingsItem.setTitle(i18n("settings.launcher.general")); settingsItem.setLeftGraphic(wrap(SVG.APPLICATION_OUTLINE)); @@ -102,7 +104,7 @@ public class LauncherSettingsPage extends DecoratorAnimatedPage implements Decor downloadItem.activeProperty().bind(tab.getSelectionModel().selectedItemProperty().isEqualTo(downloadTab)); downloadItem.setOnAction(e -> tab.select(downloadTab)); }) - .startCategory(i18n("help")) + .startCategory(i18n("help").toUpperCase(Locale.ROOT)) .addNavigationDrawerItem(helpItem -> { helpItem.setTitle(i18n("help")); helpItem.setLeftGraphic(wrap(SVG.HELP_CIRCLE_OUTLINE));