Skip to content

Commit

Permalink
Title Bar height fix (#1620)
Browse files Browse the repository at this point in the history
Changed the height of the Title Bar caption buttons (minimize, maximize,
close) from 32px to 48px so it matches the height of the AppTitleBar
UIElement.

## Description
Set the PreferredHeightOption of the Title Bar to Tall.

## Motivation and Context
The current caption buttons look weird. The fix is also just one line.
## Screenshots:

![image](https://github.com/user-attachments/assets/65e75644-6c5e-489a-a56f-9778c67c405f)
  • Loading branch information
MGGSK authored Sep 25, 2024
1 parent d7a2ee4 commit b8bbce3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions WinUIGallery/Navigation/NavigationRootPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public NavigationRootPage()

AppWindow appWindow = WindowHelper.GetAppWindow(window);
appWindow.SetIcon("Assets/Tiles/GalleryIcon.ico");
appWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;
_settings = new UISettings();
_settings.ColorValuesChanged += _settings_ColorValuesChanged; // cannot use FrameworkElement.ActualThemeChanged event because the triggerTitleBarRepaint workaround no longer works
};
Expand Down

0 comments on commit b8bbce3

Please sign in to comment.