From 5fce8863d801eccb21920dd4e091fdb256925c88 Mon Sep 17 00:00:00 2001 From: Laute Date: Sun, 7 Nov 2021 14:59:27 +0100 Subject: [PATCH] Titlebar improvements --- .../App.xaml.cs | 3 +++ .../MainWindow.xaml | 14 ++++++++++++-- .../Views/ShellPage.xaml | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/App.xaml.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/App.xaml.cs index 43be8b0c3..9862e53fb 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/App.xaml.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/App.xaml.cs @@ -32,6 +32,9 @@ namespace Microsoft.PowerToys.Settings.UI.WinUI3 protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) { m_window = new MainWindow(); + //m_window.ExtendsContentIntoTitleBar = true; + //m_window.SetTitleBar(m_window.CustomTitleBar); // This should work according to docs, but it doesn't.... So disabling for now together with ExtendsContentIntoTitleBar + m_window.Title = "PowerToys Settings"; m_window.Activate(); } diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/MainWindow.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/MainWindow.xaml index 93ee7d9de..0906d8dc5 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/MainWindow.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/MainWindow.xaml @@ -7,7 +7,17 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> - - + + + + diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/Views/ShellPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/Views/ShellPage.xaml index 0d2f229a1..c23b0ade1 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/Views/ShellPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.WinUI3/Views/ShellPage.xaml @@ -19,7 +19,7 @@ + >