mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
CmdPal: Handle an empty icon in dock items (#45968)
## Summary of the Pull Request This PR allows dock to handle items without an icon better: - Hides the icon element when a dock item is not visible and center text labels in vertical dock modes. - Adds an icon to clock dock wrapper, so it appears in settings. - Stretches buttons with icon and labels in the vertical docks to the full width. - Fixes `IconInfoViewModel.IconForTheme` method implementation. ## Pictures? Pictures! Horizontal Dock: <img width="393" height="84" alt="image" src="https://github.com/user-attachments/assets/d12aa406-da9d-4bd2-b464-595deab41d2e" /> <img width="390" height="105" alt="image" src="https://github.com/user-attachments/assets/c28d65c0-1023-47d0-9ff5-85c74a18c342" /> Vertical Dock: <img width="153" height="258" alt="image" src="https://github.com/user-attachments/assets/e1be59d9-fa1f-4a24-b0c1-e8cff4211906" /> Settings: <img width="1266" height="713" alt="image" src="https://github.com/user-attachments/assets/722d47da-c668-4df2-9f1d-bf7808333be4" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #45955
This commit is contained in:
@@ -57,7 +57,10 @@ public sealed partial class TimeDateCommandsProvider : CommandProvider
|
||||
var wrappedBand = new WrappedDockItem(
|
||||
[_bandItem],
|
||||
"com.microsoft.cmdpal.timedate.dockBand",
|
||||
Resources.Microsoft_plugin_timedate_dock_band_title);
|
||||
Resources.Microsoft_plugin_timedate_dock_band_title)
|
||||
{
|
||||
Icon = Icons.TimeDateExtIcon,
|
||||
};
|
||||
|
||||
return new ICommandItem[] { wrappedBand };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user