Skip to content

Commit 7ac5ce5

Browse files
committed
Changed API for checking titlebar customization availability
1 parent 7df0001 commit 7ac5ce5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: SecureFolderFS.WinUI/Helpers/ThemeHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void UpdateTheme()
5858
{
5959
case ApplicationTheme.Dark:
6060
case ApplicationTheme.Light:
61-
if (_appWindow.TitleBar is not null)
61+
if (AppWindowTitleBar.IsCustomizationSupported())
6262
{
6363
_appWindow.TitleBar.ButtonHoverBackgroundColor = (Color)Application.Current.Resources["SystemBaseLowColor"];
6464
_appWindow.TitleBar.ButtonForegroundColor = (Color)Application.Current.Resources["SystemBaseHighColor"];

Diff for: SecureFolderFS.WinUI/Windows/MainWindow.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private void EnsureEarlyWindow()
4242
// Set title
4343
AppWindow.Title = "SecureFolderFS";
4444

45-
if (AppWindow.TitleBar is not null)
45+
if (AppWindowTitleBar.IsCustomizationSupported())
4646
{
4747
// Extend title bar
4848
AppWindow.TitleBar.ExtendsContentIntoTitleBar = true;

0 commit comments

Comments
 (0)