From cc3c3c036777718922bc22860ff730cc35d00d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pol=C3=A1=C5=A1ek?= Date: Sun, 1 Mar 2026 20:06:42 +0100 Subject: [PATCH] Dock: dock visual nits and bits (#45873) ## Summary of the Pull Request - Improves vertical (left/right) dock layout: - Dock items are not clipped; - Items with label(s) are stretched to full width; - Items without label(s) are centered. - Top button is in the absolute corner to make clicking to it easier. - Dock items now have a min width and height 32px. - Removes a duplicate "No background" label in the expander body on the Dock settings page. ## Pictures? Pictures! Vertical layout: image Horizontal layout: image ## PR Checklist - [ ] Closes: #xxx - [ ] **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 - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- .../Controls/ScrollContainer.xaml | 12 ++++++------ .../cmdpal/Microsoft.CmdPal.UI/Dock/DockControl.xaml | 8 ++++---- .../Microsoft.CmdPal.UI/Dock/DockItemControl.xaml | 5 ++++- .../Microsoft.CmdPal.UI/Dock/DockItemControl.xaml.cs | 2 +- .../Microsoft.CmdPal.UI/Strings/en-us/Resources.resw | 3 --- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/ScrollContainer.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/ScrollContainer.xaml index c649c677ea..ef1e65a01f 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/ScrollContainer.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/ScrollContainer.xaml @@ -141,10 +141,10 @@ Grid.Column="1"> @@ -188,9 +188,9 @@ - + - + @@ -210,9 +210,9 @@ - + - + diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockControl.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockControl.xaml index 48d29a2df2..738ee5f05f 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockControl.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockControl.xaml @@ -386,8 +386,8 @@ - - + + @@ -425,8 +425,8 @@ - - + + diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockItemControl.xaml b/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockItemControl.xaml index 18957f82ab..9c595762d9 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockItemControl.xaml +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockItemControl.xaml @@ -66,6 +66,8 @@ ToolTipService.ToolTip="{TemplateBinding ToolTip}"> - + @@ -164,6 +166,7 @@ + diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockItemControl.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockItemControl.xaml.cs index 527b2bd834..aa61325603 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockItemControl.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Dock/DockItemControl.xaml.cs @@ -170,7 +170,7 @@ public sealed partial class DockItemControl : Control } } - HorizontalAlignment = HorizontalAlignment.Center; + HorizontalAlignment = HorizontalAlignment.Stretch; } private void UpdateAllVisibility() diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw b/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw index e40c0b05b0..24c415c470 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw @@ -796,9 +796,6 @@ Right-click to remove the key combination, thereby deactivating the shortcut. Colorization mode - - No background - No settings