mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-12 19:37:06 +00:00
UI: Add keybinds to useful things
This commit is contained in:
parent
5ea895ed2e
commit
e7e89efb3c
10 changed files with 87 additions and 45 deletions
|
|
@ -38,7 +38,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
public partial class MainWindow : StyleableWindow
|
||||
{
|
||||
internal static MainWindowViewModel MainWindowViewModel { get; private set; }
|
||||
|
||||
|
||||
private bool _isLoading;
|
||||
private bool _applicationsLoadedOnce;
|
||||
|
||||
|
|
@ -67,9 +67,20 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
public readonly double StatusBarHeight;
|
||||
public readonly double MenuBarHeight;
|
||||
|
||||
// The special window decoration from AppWindow in FluentAvalonia is only present on Windows;
|
||||
// and as such optimizing for the fact that the menu bar and the title bar are the same is only needed on Windows.
|
||||
// Maximized is considered superior to FullScreen on Windows in this case because you get the benefits of being in full screen,
|
||||
// while still being able to use the standard 3 window controls in the top right to minimize, make the window smaller, or close the app.
|
||||
|
||||
public static readonly WindowState FullScreenWindowState =
|
||||
OperatingSystem.IsWindows() ? WindowState.Maximized : WindowState.FullScreen;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
ViewModel = new MainWindowViewModel();
|
||||
DataContext = ViewModel = new MainWindowViewModel
|
||||
{
|
||||
Window = this
|
||||
};
|
||||
|
||||
MainWindowViewModel = ViewModel;
|
||||
|
||||
|
|
@ -220,7 +231,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
ViewModel.ShowContent = true;
|
||||
ViewModel.IsLoadingIndeterminate = false;
|
||||
|
||||
if (startFullscreen && ViewModel.WindowState != WindowState.FullScreen)
|
||||
if (startFullscreen && ViewModel.WindowState != MainWindow.FullScreenWindowState)
|
||||
{
|
||||
ViewModel.ToggleFullscreen();
|
||||
}
|
||||
|
|
@ -232,7 +243,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
ViewModel.ShowLoadProgress = true;
|
||||
ViewModel.IsLoadingIndeterminate = true;
|
||||
|
||||
if (startFullscreen && ViewModel.WindowState != WindowState.FullScreen)
|
||||
if (startFullscreen && ViewModel.WindowState != MainWindow.FullScreenWindowState)
|
||||
{
|
||||
ViewModel.ToggleFullscreen();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue