Skip to content

Fix for CmdPal settings page offset#46568

Merged
niels9001 merged 4 commits intomainfrom
niels9001/settingspage-fix
Apr 1, 2026
Merged

Fix for CmdPal settings page offset#46568
niels9001 merged 4 commits intomainfrom
niels9001/settingspage-fix

Conversation

@niels9001
Copy link
Copy Markdown
Collaborator

@niels9001 niels9001 commented Mar 27, 2026

Summary of the Pull Request

This is a weird bug in WinUI where a child panel gets a weird offset when wrapped in a ScrollViewer and if it has a MaxWidth. The solution is to wrap it with another panel 🤷

Top: with fix
Bottom: 0.98.1
image

PR Checklist

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@niels9001 niels9001 requested a review from Copilot March 27, 2026 13:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a WinUI layout bug affecting the CmdPal settings page where content becomes offset/cropped when a MaxWidth panel is hosted inside a ScrollViewer, improving resize behavior in Settings.

Changes:

  • Wrapes the CmdPal page content in an additional panel inside the ScrollViewer to avoid the WinUI offset issue.
  • Switches the page’s max width from a hard-coded value to the shared PageMaxWidth resource.

Comment thread src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml
Comment thread src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@jiripolasek jiripolasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulled, tested, LGTM

Comment thread src/settings-ui/Settings.UI/SettingsXAML/Views/CmdPalPage.xaml Outdated
Co-authored-by: Jiří Polášek <me@jiripolasek.com>
@niels9001 niels9001 enabled auto-merge (squash) April 1, 2026 04:55
@niels9001 niels9001 requested a review from jiripolasek April 1, 2026 04:55
@niels9001 niels9001 merged commit ee70b3c into main Apr 1, 2026
15 checks passed
@LegendaryBlair LegendaryBlair added this to the PowerToys 0.99 milestone Apr 16, 2026
@LegendaryBlair LegendaryBlair added the Product-Command Palette Refers to the Command Palette utility label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.99 Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings: Command Palette settings page does not resize properly

4 participants