mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +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:
@@ -22,7 +22,7 @@ public partial class IconInfoViewModel : ObservableObject, IIconInfo
|
||||
|
||||
public IconDataViewModel Dark { get; private set; }
|
||||
|
||||
public IconDataViewModel IconForTheme(bool light) => Light = light ? Light : Dark;
|
||||
public IconDataViewModel IconForTheme(bool light) => light ? Light : Dark;
|
||||
|
||||
public bool HasIcon(bool light) => IconForTheme(light).HasIcon;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user