From 7aede70ba95b0a0cd0ebdf70c36eac06cf16b997 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Tue, 24 Dec 2024 21:00:41 -0600 Subject: [PATCH] UI: Make custom title bar window controls extend exactly as long as the menu bar is tall --- src/Ryujinx/UI/Windows/MainWindow.axaml.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs index e621b42ec..660caa605 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs @@ -91,12 +91,14 @@ namespace Ryujinx.Ava.UI.Windows TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowTitleBar; TitleBar.TitleBarHitTestType = (ConfigurationState.Instance.ShowTitleBar) ? TitleBarHitTestType.Simple : TitleBarHitTestType.Complex; - // Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024) - TitleBarHeight = (ConfigurationState.Instance.ShowTitleBar ? TitleBar.Height : 0); - // NOTE: Height of MenuBar and StatusBar is not usable here, since it would still be 0 at this point. StatusBarHeight = StatusBarView.StatusBar.MinHeight; MenuBarHeight = MenuBar.MinHeight; + + TitleBar.Height = MenuBarHeight; + + // Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024) + TitleBarHeight = (ConfigurationState.Instance.ShowTitleBar ? TitleBar.Height : 0); ApplicationList.DataContext = DataContext; ApplicationGrid.DataContext = DataContext;