UI: Fix diaglog popups doubling the window controls and laying text over the menu bar.

This commit is contained in:
Evan Husted
2024-10-17 11:51:40 -05:00
parent 045f9a39bb
commit 430073817c
21 changed files with 75 additions and 60 deletions

View File

@ -26,16 +26,15 @@ namespace Ryujinx.Ava.UI.Views.Main
if (VisualRoot is MainWindow window)
{
Window = window;
DataContext = window.ViewModel;
}
DataContext = MainWindow.ViewModel;
}
private void VsyncStatus_PointerReleased(object sender, PointerReleasedEventArgs e)
{
MainWindow.ViewModel.AppHost.ToggleVSync();
Window.ViewModel.AppHost.ToggleVSync();
Logger.Info?.Print(LogClass.Application, $"VSync toggled to: {MainWindow.ViewModel.AppHost.Device.EnableDeviceVsync}");
Logger.Info?.Print(LogClass.Application, $"VSync toggled to: {Window.ViewModel.AppHost.Device.EnableDeviceVsync}");
}
private void DockedStatus_PointerReleased(object sender, PointerReleasedEventArgs e)
@ -57,9 +56,9 @@ namespace Ryujinx.Ava.UI.Views.Main
private void VolumeStatus_OnPointerWheelChanged(object sender, PointerWheelEventArgs e)
{
// Change the volume by 5% at a time
float newValue = MainWindow.ViewModel.Volume + (float)e.Delta.Y * 0.05f;
float newValue = Window.ViewModel.Volume + (float)e.Delta.Y * 0.05f;
MainWindow.ViewModel.Volume = newValue switch
Window.ViewModel.Volume = newValue switch
{
< 0 => 0,
> 1 => 1,