Avalonia: Clean up leftover RenderTimer & Fix minimum and initial window size (#3935)

* ava: Cleanup RenderTimer

* ava: Remove ContentControl from RendererHost

* ava: Remove unused actual scale factor

* ava: Enable UseGpu for Linux

* ava: Set better initial size & Scale the window properly

* ava: Realign properties

* ava: Use explicit type & specify where the note applies
This commit is contained in:
TSRBerry
2022-11-30 23:34:25 +01:00
committed by GitHub
parent d2686e0a5b
commit 3fb583c98c
6 changed files with 13 additions and 132 deletions

View File

@@ -13,7 +13,7 @@
Title="Ryujinx"
Width="1280"
Height="785"
MinWidth="1024"
MinWidth="1092"
MinHeight="680"
d:DesignHeight="720"
d:DesignWidth="1280"
@@ -57,6 +57,8 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel
Name="MenuBar"
MinHeight="35"
Grid.Row="0"
Margin="0"
HorizontalAlignment="Stretch"
@@ -549,6 +551,7 @@
<Grid
Name="StatusBar"
Grid.Row="2"
MinHeight="30"
Height="30"
Margin="0,0"
HorizontalAlignment="Stretch"

View File

@@ -90,7 +90,9 @@ namespace Ryujinx.Ava.Ui.Windows
Title = $"Ryujinx {Program.Version}";
Height /= Program.WindowScaleFactor;
// NOTE: Height of MenuBar and StatusBar is not usable here, since it would still be 0 at this point.
double barHeight = MenuBar.MinHeight + StatusBar.MinHeight;
Height = ((Height - barHeight) / Program.WindowScaleFactor) + barHeight;
Width /= Program.WindowScaleFactor;
if (Program.PreviewerDetached)