aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/Ui/Windows
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2022-11-30 23:34:25 +0100
committerGitHub <noreply@github.com>2022-11-30 23:34:25 +0100
commit3fb583c98c39da58f0752c652ca60be87ff1f566 (patch)
tree6be74e635521ca677f9bfb5d5847a4a3ee5e364b /Ryujinx.Ava/Ui/Windows
parentd2686e0a5b4f8ce70cbbd5cfcb02434921580834 (diff)
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
Diffstat (limited to 'Ryujinx.Ava/Ui/Windows')
-rw-r--r--Ryujinx.Ava/Ui/Windows/MainWindow.axaml5
-rw-r--r--Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs4
2 files changed, 7 insertions, 2 deletions
diff --git a/Ryujinx.Ava/Ui/Windows/MainWindow.axaml b/Ryujinx.Ava/Ui/Windows/MainWindow.axaml
index 313e701c..5b9dd8f9 100644
--- a/Ryujinx.Ava/Ui/Windows/MainWindow.axaml
+++ b/Ryujinx.Ava/Ui/Windows/MainWindow.axaml
@@ -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"
diff --git a/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs
index e874982a..8b5a39a7 100644
--- a/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs
+++ b/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs
@@ -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)