Powertoys: Title bar size is different to UWP apps

Created on 6 Sep 2020  ยท  12Comments  ยท  Source: microsoft/PowerToys

โ„น Computer information

  • PowerToys version: 0.21.1
  • PowerToy Utility: n/a
  • Running PowerToys as Admin: no
  • Windows build number: 19042.450

๐Ÿ“ Provide detailed reproduction steps (if any)

  1. open powertoys
  2. maximise settings window

โœ”๏ธ Expected result

titlebar is same size as uwp apps

โŒ Actual result

titlebar is not the same size

๐Ÿ“ท Screenshots

_Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form_

PowerToys:
image

Feedback Hub (I tried to find a UWP app that follows the enable coloured title bars setting. lol you can see the bug where here is a massive gap next to the back button. and that missing top 1px border. rip testers.):
image

PowerToys, maximised:
image

Feedback Hub, maximised:
image

This happens to a bunch of win32 apps. The icons of the caption buttons are also positioned slightly differently between UWP apps and apps like Chromium, which doesn't have a pre-windows 10 sized titlebar when maximised. This may be a Project Reunion issue or a duplicate. Oh and I noticed that the navigation pane in powertoys is darker than other apps

Issue-Bug Resolution-Duplicate

All 12 comments

Is PT a UWP app? I dont think so. Or am I wrong?

@Aaron-Junker yeah it isn't a uwp app

I dont think its important to change that

@Poopooracoocoo We are using XAML Islands: the Settings content is UWP, the titlebar still WPF. Once we move to WinUI 3.0 we can hopefully tackle this.

Also, duplicate of #1547

@niels9001 reckon it's worth making a Project Reunion or WPF issue discussing the sizes of title bars of win32 apps?

@niels9001 reckon it's worth making a Project Reunion or WPF issue discussing the sizes of title bars of win32 apps?

That's a great idea! Please reference this post so we can track that to provide additional information ๐Ÿ‘

done

Hey @niels9001,

If the settings window is a WPF window, can't you use a custom WPF window style for it.

Or for an easy approach just use some 3rd party libs like ModernWpf just for the settings window.

It would improve the consistency drastically and will reduce the overhead work for you to create your own WPF styles and themes just to match WinUI.

P.S. The said lib has inbuilt dark/light theme support and some controls ported WinUI.

I looked at customizing the window style itself, but required to write custom minimize, maximize and close buttons (like the Terminal team did) if you want to extend the XAML island into the titlebar area.

Haven't looked at ModernWPF, is there a sample somewhere that shows a XAML Island extending into the TitleBar?

I will try to provide some samples pal. Please give me an hour, I will upload a sample to GitHub.

@ShankarBUS Thanks! Please provide any screenshots/samples in the issue actually tracking this issue: #1547

So @niels9001, xaml islands just creates a child window to/over the WPF window (and is parented to it). We won't be able to overlay the contents from the WPF window over the UWP content. So "Extending the view into TitleBar" won't work in this scenario ๐Ÿ˜….

image
image

Sorry for wasting your time ๐Ÿ˜…

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Garconis picture Garconis  ยท  3Comments

saahmedm picture saahmedm  ยท  3Comments

aminya picture aminya  ยท  3Comments

patware picture patware  ยท  3Comments

ivadham picture ivadham  ยท  3Comments