diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs index 1eb970016..b357f0d30 100644 --- a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs +++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs @@ -16,7 +16,7 @@ public class ConfigurationFileFormat /// /// The current version of the file format /// - public const int CurrentVersion = 55; + public const int CurrentVersion = 56; /// /// Version of the configuration file format @@ -173,6 +173,11 @@ public class ConfigurationFileFormat /// public bool RememberWindowState { get; set; } + /// + /// Enables or disables the redesigned title bar + /// + public bool ShowTitleBar { get; set; } + /// /// Enables hardware-accelerated rendering for Avalonia /// diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs index 89aaaabbe..b7ad29051 100644 --- a/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs +++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs @@ -652,6 +652,11 @@ public MultiplayerSection() /// public ReactiveObject RememberWindowState { get; private set; } + /// + /// Enables or disables the redesigned title bar + /// + public ReactiveObject ShowTitleBar { get; private set; } + /// /// Enables hardware-accelerated rendering for Avalonia /// @@ -675,6 +680,7 @@ private ConfigurationState() ShowConfirmExit = new ReactiveObject(); IgnoreApplet = new ReactiveObject(); RememberWindowState = new ReactiveObject(); + ShowTitleBar = new ReactiveObject(); EnableHardwareAcceleration = new ReactiveObject(); HideCursor = new ReactiveObject(); } @@ -714,6 +720,7 @@ public ConfigurationFileFormat ToFileFormat() ShowConfirmExit = ShowConfirmExit, IgnoreApplet = IgnoreApplet, RememberWindowState = RememberWindowState, + ShowTitleBar = ShowTitleBar, EnableHardwareAcceleration = EnableHardwareAcceleration, HideCursor = HideCursor, EnableVsync = Graphics.EnableVsync, @@ -826,6 +833,7 @@ public void LoadDefault() ShowConfirmExit.Value = true; IgnoreApplet.Value = false; RememberWindowState.Value = true; + ShowTitleBar.Value = !OperatingSystem.IsWindows(); EnableHardwareAcceleration.Value = true; HideCursor.Value = HideCursorMode.OnIdle; Graphics.EnableVsync.Value = true; @@ -1540,6 +1548,15 @@ public void Load(ConfigurationFileFormat configurationFileFormat, string configu configurationFileUpdated = true; } + if (configurationFileFormat.Version < 56) + { + Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 56."); + + configurationFileFormat.ShowTitleBar = !OperatingSystem.IsWindows(); + + configurationFileUpdated = true; + } + Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog; Graphics.ResScale.Value = configurationFileFormat.ResScale; Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom; @@ -1572,6 +1589,7 @@ public void Load(ConfigurationFileFormat configurationFileFormat, string configu ShowConfirmExit.Value = configurationFileFormat.ShowConfirmExit; IgnoreApplet.Value = configurationFileFormat.IgnoreApplet; RememberWindowState.Value = configurationFileFormat.RememberWindowState; + ShowTitleBar.Value = configurationFileFormat.ShowTitleBar; EnableHardwareAcceleration.Value = configurationFileFormat.EnableHardwareAcceleration; HideCursor.Value = configurationFileFormat.HideCursor; Graphics.EnableVsync.Value = configurationFileFormat.EnableVsync; diff --git a/src/Ryujinx/Assets/Locales/ar_SA.json b/src/Ryujinx/Assets/Locales/ar_SA.json index f0dfe40b8..22e270901 100644 --- a/src/Ryujinx/Assets/Locales/ar_SA.json +++ b/src/Ryujinx/Assets/Locales/ar_SA.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "التحقق من وجود تحديثات عند التشغيل", "SettingsTabGeneralShowConfirmExitDialog": "إظهار مربع حوار \"تأكيد الخروج\"", "SettingsTabGeneralRememberWindowState": "تذكر حجم/موضع النافذة", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "إخفاء المؤشر:", "SettingsTabGeneralHideCursorNever": "مطلقا", "SettingsTabGeneralHideCursorOnIdle": "عند الخمول", diff --git a/src/Ryujinx/Assets/Locales/de_DE.json b/src/Ryujinx/Assets/Locales/de_DE.json index dbda1755b..94e372e2e 100644 --- a/src/Ryujinx/Assets/Locales/de_DE.json +++ b/src/Ryujinx/Assets/Locales/de_DE.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Beim Start nach Updates suchen", "SettingsTabGeneralShowConfirmExitDialog": "Zeige den \"Beenden bestätigen\"-Dialog", "SettingsTabGeneralRememberWindowState": "Fenstergröße/-position merken", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Mauszeiger ausblenden", "SettingsTabGeneralHideCursorNever": "Niemals", "SettingsTabGeneralHideCursorOnIdle": "Mauszeiger bei Inaktivität ausblenden", diff --git a/src/Ryujinx/Assets/Locales/el_GR.json b/src/Ryujinx/Assets/Locales/el_GR.json index c42a73726..89389d337 100644 --- a/src/Ryujinx/Assets/Locales/el_GR.json +++ b/src/Ryujinx/Assets/Locales/el_GR.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Έλεγχος για Ενημερώσεις στην Εκκίνηση", "SettingsTabGeneralShowConfirmExitDialog": "Εμφάνιση διαλόγου \"Επιβεβαίωση Εξόδου\".", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Απόκρυψη Κέρσορα:", "SettingsTabGeneralHideCursorNever": "Ποτέ", "SettingsTabGeneralHideCursorOnIdle": "Απόκρυψη Δρομέα στην Αδράνεια", diff --git a/src/Ryujinx/Assets/Locales/en_US.json b/src/Ryujinx/Assets/Locales/en_US.json index 26342ec4b..68b48146b 100644 --- a/src/Ryujinx/Assets/Locales/en_US.json +++ b/src/Ryujinx/Assets/Locales/en_US.json @@ -100,6 +100,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Check for Updates on Launch", "SettingsTabGeneralShowConfirmExitDialog": "Show \"Confirm Exit\" Dialog", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Hide Cursor:", "SettingsTabGeneralHideCursorNever": "Never", "SettingsTabGeneralHideCursorOnIdle": "On Idle", diff --git a/src/Ryujinx/Assets/Locales/es_ES.json b/src/Ryujinx/Assets/Locales/es_ES.json index d3050f979..d6eb8017a 100644 --- a/src/Ryujinx/Assets/Locales/es_ES.json +++ b/src/Ryujinx/Assets/Locales/es_ES.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Buscar actualizaciones al iniciar", "SettingsTabGeneralShowConfirmExitDialog": "Mostrar diálogo de confirmación al cerrar", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Esconder el cursor:", "SettingsTabGeneralHideCursorNever": "Nunca", "SettingsTabGeneralHideCursorOnIdle": "Ocultar cursor cuando esté inactivo", diff --git a/src/Ryujinx/Assets/Locales/fr_FR.json b/src/Ryujinx/Assets/Locales/fr_FR.json index 689ea8a2a..deb53d736 100644 --- a/src/Ryujinx/Assets/Locales/fr_FR.json +++ b/src/Ryujinx/Assets/Locales/fr_FR.json @@ -100,6 +100,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Vérifier les mises à jour au démarrage", "SettingsTabGeneralShowConfirmExitDialog": "Afficher le message de \"Confirmation de sortie\"", "SettingsTabGeneralRememberWindowState": "Mémoriser la taille/position de la fenêtre", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Masquer le Curseur :", "SettingsTabGeneralHideCursorNever": "Jamais", "SettingsTabGeneralHideCursorOnIdle": "Masquer le curseur si inactif", diff --git a/src/Ryujinx/Assets/Locales/he_IL.json b/src/Ryujinx/Assets/Locales/he_IL.json index 1bf6f3154..eb7ccf322 100644 --- a/src/Ryujinx/Assets/Locales/he_IL.json +++ b/src/Ryujinx/Assets/Locales/he_IL.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "בדוק אם קיימים עדכונים בהפעלה", "SettingsTabGeneralShowConfirmExitDialog": "הראה דיאלוג \"אשר יציאה\"", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "הסתר את הסמן", "SettingsTabGeneralHideCursorNever": "אף פעם", "SettingsTabGeneralHideCursorOnIdle": "במצב סרק", diff --git a/src/Ryujinx/Assets/Locales/it_IT.json b/src/Ryujinx/Assets/Locales/it_IT.json index 07169c3e3..61d5f8e55 100644 --- a/src/Ryujinx/Assets/Locales/it_IT.json +++ b/src/Ryujinx/Assets/Locales/it_IT.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Controlla aggiornamenti all'avvio", "SettingsTabGeneralShowConfirmExitDialog": "Mostra dialogo \"Conferma Uscita\"", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Nascondi il cursore:", "SettingsTabGeneralHideCursorNever": "Mai", "SettingsTabGeneralHideCursorOnIdle": "Quando è inattivo", diff --git a/src/Ryujinx/Assets/Locales/ja_JP.json b/src/Ryujinx/Assets/Locales/ja_JP.json index 907740004..d43dedc2a 100644 --- a/src/Ryujinx/Assets/Locales/ja_JP.json +++ b/src/Ryujinx/Assets/Locales/ja_JP.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "起動時にアップデートを確認する", "SettingsTabGeneralShowConfirmExitDialog": "\"終了を確認\" ダイアログを表示する", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "マウスカーソルを非表示", "SettingsTabGeneralHideCursorNever": "決して", "SettingsTabGeneralHideCursorOnIdle": "アイドル時", diff --git a/src/Ryujinx/Assets/Locales/ko_KR.json b/src/Ryujinx/Assets/Locales/ko_KR.json index f08c0e5f9..6e5a7f187 100644 --- a/src/Ryujinx/Assets/Locales/ko_KR.json +++ b/src/Ryujinx/Assets/Locales/ko_KR.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "시작 시, 업데이트 확인", "SettingsTabGeneralShowConfirmExitDialog": "\"종료 확인\" 대화 상자 표시", "SettingsTabGeneralRememberWindowState": "창 크기/위치 기억", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "마우스 커서 숨기기", "SettingsTabGeneralHideCursorNever": "절대 안 함", "SettingsTabGeneralHideCursorOnIdle": "유휴 상태", diff --git a/src/Ryujinx/Assets/Locales/pl_PL.json b/src/Ryujinx/Assets/Locales/pl_PL.json index 03df59406..a377979bd 100644 --- a/src/Ryujinx/Assets/Locales/pl_PL.json +++ b/src/Ryujinx/Assets/Locales/pl_PL.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Sprawdzaj aktualizacje przy uruchomieniu", "SettingsTabGeneralShowConfirmExitDialog": "Pokazuj okno dialogowe \"Potwierdź wyjście\"", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Ukryj kursor:", "SettingsTabGeneralHideCursorNever": "Nigdy", "SettingsTabGeneralHideCursorOnIdle": "Gdy bezczynny", diff --git a/src/Ryujinx/Assets/Locales/pt_BR.json b/src/Ryujinx/Assets/Locales/pt_BR.json index 235ad388a..f6e2798c5 100644 --- a/src/Ryujinx/Assets/Locales/pt_BR.json +++ b/src/Ryujinx/Assets/Locales/pt_BR.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Verificar se há atualizações ao iniciar", "SettingsTabGeneralShowConfirmExitDialog": "Exibir diálogo de confirmação ao sair", "SettingsTabGeneralRememberWindowState": "Lembrar tamanho/posição da Janela", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Esconder o cursor do mouse:", "SettingsTabGeneralHideCursorNever": "Nunca", "SettingsTabGeneralHideCursorOnIdle": "Esconder o cursor quando ocioso", diff --git a/src/Ryujinx/Assets/Locales/ru_RU.json b/src/Ryujinx/Assets/Locales/ru_RU.json index 8b0235cb8..8b9d39302 100644 --- a/src/Ryujinx/Assets/Locales/ru_RU.json +++ b/src/Ryujinx/Assets/Locales/ru_RU.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Проверять наличие обновлений при запуске", "SettingsTabGeneralShowConfirmExitDialog": "Подтверждать выход из приложения", "SettingsTabGeneralRememberWindowState": "Запомнить размер/положение окна", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Скрывать курсор", "SettingsTabGeneralHideCursorNever": "Никогда", "SettingsTabGeneralHideCursorOnIdle": "В простое", diff --git a/src/Ryujinx/Assets/Locales/th_TH.json b/src/Ryujinx/Assets/Locales/th_TH.json index e300d0c35..9e267dc9e 100644 --- a/src/Ryujinx/Assets/Locales/th_TH.json +++ b/src/Ryujinx/Assets/Locales/th_TH.json @@ -100,6 +100,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "ตรวจหาการอัปเดตเมื่อเปิดโปรแกรม", "SettingsTabGeneralShowConfirmExitDialog": "แสดง \"ปุ่มยืนยันการออก\" เมื่อออกเกม", "SettingsTabGeneralRememberWindowState": "จดจำ ขนาดหน้าต่างแอพพลิเคชั่น/คำแหน่ง", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "ซ่อน เคอร์เซอร์:", "SettingsTabGeneralHideCursorNever": "ไม่ต้อง", "SettingsTabGeneralHideCursorOnIdle": "เมื่อไม่ได้ใช้งาน", diff --git a/src/Ryujinx/Assets/Locales/tr_TR.json b/src/Ryujinx/Assets/Locales/tr_TR.json index a31c8df6e..1360a122e 100644 --- a/src/Ryujinx/Assets/Locales/tr_TR.json +++ b/src/Ryujinx/Assets/Locales/tr_TR.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Her Açılışta Güncellemeleri Denetle", "SettingsTabGeneralShowConfirmExitDialog": "\"Çıkışı Onayla\" Diyaloğunu Göster", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "İşaretçiyi Gizle:", "SettingsTabGeneralHideCursorNever": "Hiçbir Zaman", "SettingsTabGeneralHideCursorOnIdle": "Hareketsiz Durumda", diff --git a/src/Ryujinx/Assets/Locales/uk_UA.json b/src/Ryujinx/Assets/Locales/uk_UA.json index 5c8d6af5b..2fe5758b5 100644 --- a/src/Ryujinx/Assets/Locales/uk_UA.json +++ b/src/Ryujinx/Assets/Locales/uk_UA.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "Перевіряти наявність оновлень під час запуску", "SettingsTabGeneralShowConfirmExitDialog": "Показати діалогове вікно «Підтвердити вихід».", "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "Сховати вказівник:", "SettingsTabGeneralHideCursorNever": "Ніколи", "SettingsTabGeneralHideCursorOnIdle": "Сховати у режимі очікування", diff --git a/src/Ryujinx/Assets/Locales/zh_CN.json b/src/Ryujinx/Assets/Locales/zh_CN.json index 044da488d..e0fd15922 100644 --- a/src/Ryujinx/Assets/Locales/zh_CN.json +++ b/src/Ryujinx/Assets/Locales/zh_CN.json @@ -100,6 +100,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "启动时检查更新", "SettingsTabGeneralShowConfirmExitDialog": "退出游戏时需要确认", "SettingsTabGeneralRememberWindowState": "记住窗口大小和位置", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "隐藏鼠标指针:", "SettingsTabGeneralHideCursorNever": "从不隐藏", "SettingsTabGeneralHideCursorOnIdle": "自动隐藏", diff --git a/src/Ryujinx/Assets/Locales/zh_TW.json b/src/Ryujinx/Assets/Locales/zh_TW.json index bd1682262..e7cf35e5f 100644 --- a/src/Ryujinx/Assets/Locales/zh_TW.json +++ b/src/Ryujinx/Assets/Locales/zh_TW.json @@ -97,6 +97,7 @@ "SettingsTabGeneralCheckUpdatesOnLaunch": "啟動時檢查更新", "SettingsTabGeneralShowConfirmExitDialog": "顯示「確認結束」對話方塊", "SettingsTabGeneralRememberWindowState": "記住視窗大小/位置", + "SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)", "SettingsTabGeneralHideCursor": "隱藏滑鼠游標:", "SettingsTabGeneralHideCursorNever": "從不", "SettingsTabGeneralHideCursorOnIdle": "閒置時", diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs index ce024784e..8772b5697 100644 --- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs @@ -146,6 +146,7 @@ public bool AutoloadDirectoryChanged public bool ShowConfirmExit { get; set; } public bool IgnoreApplet { get; set; } public bool RememberWindowState { get; set; } + public bool ShowTitleBar { get; set; } public int HideCursor { get; set; } public bool EnableDockedMode { get; set; } public bool EnableKeyboard { get; set; } @@ -410,6 +411,7 @@ public void LoadCurrentConfiguration() ShowConfirmExit = config.ShowConfirmExit; IgnoreApplet = config.IgnoreApplet; RememberWindowState = config.RememberWindowState; + ShowTitleBar = config.ShowTitleBar; HideCursor = (int)config.HideCursor.Value; GameDirectories.Clear(); @@ -507,6 +509,7 @@ public void SaveSettings() config.ShowConfirmExit.Value = ShowConfirmExit; config.IgnoreApplet.Value = IgnoreApplet; config.RememberWindowState.Value = RememberWindowState; + config.ShowTitleBar.Value = ShowTitleBar; config.HideCursor.Value = (HideCursorMode)HideCursor; if (_gameDirectoryChanged) diff --git a/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml b/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml index 4e29702e6..6ee055d25 100644 --- a/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml +++ b/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml @@ -13,7 +13,7 @@ - + + + +