diff options
author | MutantAura <44103205+MutantAura@users.noreply.github.com> | 2023-04-28 21:59:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-28 22:59:53 +0200 |
commit | 21c4176157a1c7ef3086333ddb5036325869eac3 (patch) | |
tree | e88711f05cd6b7b07885771b36de6853319cb617 /src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs | |
parent | 3b4ff2d6d909dc0b74f4befe391ec537cd963ec0 (diff) |
Allow window to remember its size, position and state (GTK + Avalonia) (#4657)1.1.738
* Update ConfigurationState.cs
* Update ConfigurationFileFormat.cs
* Update MainWindow.cs
* Update ConfigurationFileFormat.cs
* Update ConfigurationState.cs
* Update MainWindow.cs
* Update MainWindow.cs
* Update Ryujinx.Ui.Common/Configuration/ConfigurationState.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Update MainWindow.cs
* Update Ryujinx/Ui/MainWindow.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Initial properties
* Viewmodel adjustments and additions
* abstract and monitor dimension changes
* Remove position from ViewModel and simplify methods
* Remove unused dep
* Update configuration and fix typo from AA
* review changes
* Review changes
* Screensize checks - Ava
* Review changes 2
* basic review changes
* Standardise GTK/Ava functions
* Actually call function
---------
Co-authored-by: HaizenTrist <123991082+HaizenTrist@users.noreply.github.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Diffstat (limited to 'src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs')
-rw-r--r-- | src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs index 14d7a0fe..f4556bc3 100644 --- a/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs @@ -95,6 +95,9 @@ namespace Ryujinx.Ava.UI.ViewModels private string _currentEmulatedGamePath; private AutoResetEvent _rendererWaitEvent; private WindowState _windowState; + private double _windowWidth; + private double _windowHeight; + private bool _isActive; public ApplicationData ListSelectedApplication; @@ -622,6 +625,28 @@ namespace Ryujinx.Ava.UI.ViewModels OnPropertyChanged(); } } + + public double WindowWidth + { + get => _windowWidth; + set + { + _windowWidth = value; + + OnPropertyChanged(); + } + } + + public double WindowHeight + { + get => _windowHeight; + set + { + _windowHeight = value; + + OnPropertyChanged(); + } + } public bool IsGrid => Glyph == Glyph.Grid; public bool IsList => Glyph == Glyph.List; |