mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-22 19:15:47 +00:00
Add option to show the old title bar (#101)
This commit is contained in:
parent
9c94db1130
commit
5845787325
26 changed files with 55 additions and 5 deletions
|
@ -16,7 +16,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
/// <summary>
|
||||
/// The current version of the file format
|
||||
/// </summary>
|
||||
public const int CurrentVersion = 55;
|
||||
public const int CurrentVersion = 56;
|
||||
|
||||
/// <summary>
|
||||
/// Version of the configuration file format
|
||||
|
@ -173,6 +173,11 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
/// </summary>
|
||||
public bool RememberWindowState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables the redesigned title bar
|
||||
/// </summary>
|
||||
public bool ShowTitleBar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables hardware-accelerated rendering for Avalonia
|
||||
/// </summary>
|
||||
|
|
|
@ -652,6 +652,11 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
/// </summary>
|
||||
public ReactiveObject<bool> RememberWindowState { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables the redesigned title bar
|
||||
/// </summary>
|
||||
public ReactiveObject<bool> ShowTitleBar { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables hardware-accelerated rendering for Avalonia
|
||||
/// </summary>
|
||||
|
@ -675,6 +680,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
ShowConfirmExit = new ReactiveObject<bool>();
|
||||
IgnoreApplet = new ReactiveObject<bool>();
|
||||
RememberWindowState = new ReactiveObject<bool>();
|
||||
ShowTitleBar = new ReactiveObject<bool>();
|
||||
EnableHardwareAcceleration = new ReactiveObject<bool>();
|
||||
HideCursor = new ReactiveObject<HideCursorMode>();
|
||||
}
|
||||
|
@ -714,6 +720,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
ShowConfirmExit = ShowConfirmExit,
|
||||
IgnoreApplet = IgnoreApplet,
|
||||
RememberWindowState = RememberWindowState,
|
||||
ShowTitleBar = ShowTitleBar,
|
||||
EnableHardwareAcceleration = EnableHardwareAcceleration,
|
||||
HideCursor = HideCursor,
|
||||
EnableVsync = Graphics.EnableVsync,
|
||||
|
@ -826,6 +833,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
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 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
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 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
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;
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "التحقق من وجود تحديثات عند التشغيل",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "إظهار مربع حوار \"تأكيد الخروج\"",
|
||||
"SettingsTabGeneralRememberWindowState": "تذكر حجم/موضع النافذة",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "إخفاء المؤشر:",
|
||||
"SettingsTabGeneralHideCursorNever": "مطلقا",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "عند الخمول",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Έλεγχος για Ενημερώσεις στην Εκκίνηση",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "Εμφάνιση διαλόγου \"Επιβεβαίωση Εξόδου\".",
|
||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "Απόκρυψη Κέρσορα:",
|
||||
"SettingsTabGeneralHideCursorNever": "Ποτέ",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "Απόκρυψη Δρομέα στην Αδράνεια",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "בדוק אם קיימים עדכונים בהפעלה",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "הראה דיאלוג \"אשר יציאה\"",
|
||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "הסתר את הסמן",
|
||||
"SettingsTabGeneralHideCursorNever": "אף פעם",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "במצב סרק",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "起動時にアップデートを確認する",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "\"終了を確認\" ダイアログを表示する",
|
||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "マウスカーソルを非表示",
|
||||
"SettingsTabGeneralHideCursorNever": "決して",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "アイドル時",
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "시작 시, 업데이트 확인",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "\"종료 확인\" 대화 상자 표시",
|
||||
"SettingsTabGeneralRememberWindowState": "창 크기/위치 기억",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "마우스 커서 숨기기",
|
||||
"SettingsTabGeneralHideCursorNever": "절대 안 함",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "유휴 상태",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Проверять наличие обновлений при запуске",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "Подтверждать выход из приложения",
|
||||
"SettingsTabGeneralRememberWindowState": "Запомнить размер/положение окна",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "Скрывать курсор",
|
||||
"SettingsTabGeneralHideCursorNever": "Никогда",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "В простое",
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "ตรวจหาการอัปเดตเมื่อเปิดโปรแกรม",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "แสดง \"ปุ่มยืนยันการออก\" เมื่อออกเกม",
|
||||
"SettingsTabGeneralRememberWindowState": "จดจำ ขนาดหน้าต่างแอพพลิเคชั่น/คำแหน่ง",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "ซ่อน เคอร์เซอร์:",
|
||||
"SettingsTabGeneralHideCursorNever": "ไม่ต้อง",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "เมื่อไม่ได้ใช้งาน",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Перевіряти наявність оновлень під час запуску",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "Показати діалогове вікно «Підтвердити вихід».",
|
||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "Сховати вказівник:",
|
||||
"SettingsTabGeneralHideCursorNever": "Ніколи",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "Сховати у режимі очікування",
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "启动时检查更新",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "退出游戏时需要确认",
|
||||
"SettingsTabGeneralRememberWindowState": "记住窗口大小和位置",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "隐藏鼠标指针:",
|
||||
"SettingsTabGeneralHideCursorNever": "从不隐藏",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "自动隐藏",
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
"SettingsTabGeneralCheckUpdatesOnLaunch": "啟動時檢查更新",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "顯示「確認結束」對話方塊",
|
||||
"SettingsTabGeneralRememberWindowState": "記住視窗大小/位置",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralHideCursor": "隱藏滑鼠游標:",
|
||||
"SettingsTabGeneralHideCursorNever": "從不",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "閒置時",
|
||||
|
|
|
@ -146,6 +146,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
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 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
ShowConfirmExit = config.ShowConfirmExit;
|
||||
IgnoreApplet = config.IgnoreApplet;
|
||||
RememberWindowState = config.RememberWindowState;
|
||||
ShowTitleBar = config.ShowTitleBar;
|
||||
HideCursor = (int)config.HideCursor.Value;
|
||||
|
||||
GameDirectories.Clear();
|
||||
|
@ -507,6 +509,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
config.ShowConfirmExit.Value = ShowConfirmExit;
|
||||
config.IgnoreApplet.Value = IgnoreApplet;
|
||||
config.RememberWindowState.Value = RememberWindowState;
|
||||
config.ShowTitleBar.Value = ShowTitleBar;
|
||||
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
||||
|
||||
if (_gameDirectoryChanged)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<viewModels:MainWindowViewModel />
|
||||
</Design.DataContext>
|
||||
<DockPanel HorizontalAlignment="Stretch">
|
||||
<Border Padding="7, 0, 0, 0" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<Border Name="RyuLogo" Padding="7, 0, 0, 0" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<Image
|
||||
ToolTip.Tip="{Binding Title}"
|
||||
Height="25"
|
||||
|
|
|
@ -32,6 +32,8 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
RyuLogo.IsVisible = !ConfigurationState.Instance.ShowTitleBar;
|
||||
|
||||
ToggleFileTypesMenuItem.ItemsSource = GenerateToggleFileTypeItems();
|
||||
ChangeLanguageMenuItem.ItemsSource = GenerateLanguageMenuItems();
|
||||
}
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
<CheckBox IsChecked="{Binding RememberWindowState}">
|
||||
<TextBlock Text="{locale:Locale SettingsTabGeneralRememberWindowState}" />
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding ShowTitleBar}" Name="ShowTitleBarBox">
|
||||
<TextBlock Text="{locale:Locale SettingsTabGeneralShowTitleBar}" />
|
||||
</CheckBox>
|
||||
<StackPanel Margin="0, 15, 0, 0" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Text="{locale:Locale SettingsTabGeneralHideCursor}"
|
||||
|
|
|
@ -2,8 +2,8 @@ using Avalonia.Controls;
|
|||
using Avalonia.Interactivity;
|
||||
using Avalonia.Platform.Storage;
|
||||
using Avalonia.VisualTree;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -17,6 +17,7 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||
public SettingsUiView()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShowTitleBarBox.IsVisible = OperatingSystem.IsWindows();
|
||||
}
|
||||
|
||||
private async void AddGameDirButton_OnClick(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -82,8 +82,8 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
ViewModel.Title = App.FormatTitle();
|
||||
|
||||
TitleBar.ExtendsContentIntoTitleBar = true;
|
||||
TitleBar.TitleBarHitTestType = TitleBarHitTestType.Complex;
|
||||
TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowTitleBar;
|
||||
TitleBar.TitleBarHitTestType = (ConfigurationState.Instance.ShowTitleBar) ? TitleBarHitTestType.Simple : TitleBarHitTestType.Complex;
|
||||
|
||||
// NOTE: Height of MenuBar and StatusBar is not usable here, since it would still be 0 at this point.
|
||||
StatusBarHeight = StatusBarView.StatusBar.MinHeight;
|
||||
|
|
Loading…
Reference in a new issue