[Settings]Add the New badge to CmdPal (#38037)

This commit is contained in:
Jaime Bernardo
2025-03-19 17:51:58 +00:00
committed by GitHub
parent a13abc3803
commit dfb727f9a3
2 changed files with 9 additions and 1 deletions

View File

@@ -110,6 +110,9 @@
x:Uid="Shell_TopLevelSystemTools"
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/SystemTools.png}"
SelectsOnInvoked="False">
<NavigationViewItem.InfoBadge>
<InfoBadge Style="{StaticResource NewInfoBadge}" />
</NavigationViewItem.InfoBadge>
<NavigationViewItem.MenuItems>
<NavigationViewItem
x:Uid="Shell_AdvancedPaste"
@@ -122,7 +125,11 @@
<NavigationViewItem
x:Uid="Shell_CmdPal"
helpers:NavHelper.NavigateTo="views:CmdPalPage"
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/CmdPal.png}" />
Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/CmdPal.png}">
<NavigationViewItem.InfoBadge>
<InfoBadge Style="{StaticResource NewInfoBadge}" />
</NavigationViewItem.InfoBadge>
</NavigationViewItem>
<NavigationViewItem
x:Uid="Shell_ColorPicker"
helpers:NavHelper.NavigateTo="views:ColorPickerPage"

View File

@@ -77,6 +77,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
IsEnabled = gpo == GpoRuleConfigured.Enabled || (gpo != GpoRuleConfigured.Disabled && ModuleHelper.GetIsModuleEnabled(generalSettingsConfig, moduleType)),
IsLocked = gpo == GpoRuleConfigured.Enabled || gpo == GpoRuleConfigured.Disabled,
Icon = ModuleHelper.GetModuleTypeFluentIconName(moduleType),
IsNew = moduleType == ModuleType.CmdPal,
EnabledChangedCallback = EnabledChangedOnUI,
DashboardModuleItems = GetModuleItems(moduleType),
});