mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 15:51:59 +00:00
Revert "UI: Directly proxy window properties on the view model back to the stored window"
This reverts commit 9754d247b5
.
This commit is contained in:
parent
9eb273a0f7
commit
07074272ca
3 changed files with 43 additions and 14 deletions
|
@ -33,8 +33,11 @@ namespace Ryujinx.Ava
|
||||||
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>()
|
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>()
|
||||||
.MainWindow.Cast<MainWindow>();
|
.MainWindow.Cast<MainWindow>();
|
||||||
|
|
||||||
public static bool IsClipboardAvailable(out IClipboard clipboard)
|
public static bool IsClipboardAvailable(out IClipboard clipboard)
|
||||||
=> (clipboard = MainWindow.Clipboard) != null;
|
{
|
||||||
|
clipboard = MainWindow.Clipboard;
|
||||||
|
return clipboard != null;
|
||||||
|
}
|
||||||
|
|
||||||
public static void SetTaskbarProgress(TaskBarProgressBarState state) => MainWindow.PlatformFeatures.SetTaskBarProgressBarState(state);
|
public static void SetTaskbarProgress(TaskBarProgressBarState state) => MainWindow.PlatformFeatures.SetTaskBarProgressBarState(state);
|
||||||
public static void SetTaskbarProgressValue(ulong current, ulong total) => MainWindow.PlatformFeatures.SetTaskBarProgressBarValue(current, total);
|
public static void SetTaskbarProgressValue(ulong current, ulong total) => MainWindow.PlatformFeatures.SetTaskBarProgressBarValue(current, total);
|
||||||
|
|
|
@ -110,8 +110,13 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
private bool _areMimeTypesRegistered = FileAssociationHelper.AreMimeTypesRegistered;
|
private bool _areMimeTypesRegistered = FileAssociationHelper.AreMimeTypesRegistered;
|
||||||
private bool _canUpdate = true;
|
private bool _canUpdate = true;
|
||||||
|
private Cursor _cursor;
|
||||||
|
private string _title;
|
||||||
private ApplicationData _currentApplicationData;
|
private ApplicationData _currentApplicationData;
|
||||||
private readonly AutoResetEvent _rendererWaitEvent;
|
private readonly AutoResetEvent _rendererWaitEvent;
|
||||||
|
private WindowState _windowState;
|
||||||
|
private double _windowWidth;
|
||||||
|
private double _windowHeight;
|
||||||
private int _customVSyncInterval;
|
private int _customVSyncInterval;
|
||||||
private int _customVSyncIntervalPercentageProxy;
|
private int _customVSyncIntervalPercentageProxy;
|
||||||
|
|
||||||
|
@ -213,7 +218,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
public bool CanUpdate
|
public bool CanUpdate
|
||||||
{
|
{
|
||||||
get => _canUpdate && EnableNonGameRunningControls && Updater.CanUpdate();
|
get => _canUpdate && EnableNonGameRunningControls && Updater.CanUpdate(false);
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_canUpdate = value;
|
_canUpdate = value;
|
||||||
|
@ -223,8 +228,12 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
public Cursor Cursor
|
public Cursor Cursor
|
||||||
{
|
{
|
||||||
get => Window.Cursor;
|
get => _cursor;
|
||||||
set => Window.Cursor = value;
|
set
|
||||||
|
{
|
||||||
|
_cursor = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyObservableCollection<ApplicationData> AppsObservableList
|
public ReadOnlyObservableCollection<ApplicationData> AppsObservableList
|
||||||
|
@ -806,23 +815,35 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
public WindowState WindowState
|
public WindowState WindowState
|
||||||
{
|
{
|
||||||
get => Window.WindowState;
|
get => _windowState;
|
||||||
internal set
|
internal set
|
||||||
{
|
{
|
||||||
Window.WindowState = value;
|
_windowState = value;
|
||||||
|
|
||||||
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double WindowWidth
|
public double WindowWidth
|
||||||
{
|
{
|
||||||
get => Window.Width;
|
get => _windowWidth;
|
||||||
set => Window.Width = value;
|
set
|
||||||
|
{
|
||||||
|
_windowWidth = value;
|
||||||
|
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double WindowHeight
|
public double WindowHeight
|
||||||
{
|
{
|
||||||
get => Window.Height;
|
get => _windowHeight;
|
||||||
set => Window.Height = value;
|
set
|
||||||
|
{
|
||||||
|
_windowHeight = value;
|
||||||
|
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsGrid => Glyph == Glyph.Grid;
|
public bool IsGrid => Glyph == Glyph.Grid;
|
||||||
|
@ -870,11 +891,11 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
public string Title
|
public string Title
|
||||||
{
|
{
|
||||||
get => Window.Title;
|
get => _title;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
Window.Title = value;
|
_title = value;
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,11 @@
|
||||||
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
||||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
||||||
xmlns:main="clr-namespace:Ryujinx.Ava.UI.Views.Main"
|
xmlns:main="clr-namespace:Ryujinx.Ava.UI.Views.Main"
|
||||||
|
Cursor="{Binding Cursor}"
|
||||||
|
Title="{Binding Title}"
|
||||||
|
WindowState="{Binding WindowState}"
|
||||||
|
Width="{Binding WindowWidth}"
|
||||||
|
Height="{Binding WindowHeight}"
|
||||||
MinWidth="800"
|
MinWidth="800"
|
||||||
MinHeight="500"
|
MinHeight="500"
|
||||||
d:DesignHeight="720"
|
d:DesignHeight="720"
|
||||||
|
|
Loading…
Reference in a new issue