mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 06:17:10 +02: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
|
@ -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…
Add table
Add a link
Reference in a new issue