6 Commits

Author SHA1 Message Date
Raphire
e0e69c0ef5 Update app table header color 2026-02-18 17:32:23 +01:00
Raphire
c9ce72f79a Increase font size for column headers in app table 2026-02-18 00:36:11 +01:00
Raphire
397eba7ca8 Update app name label for clarity 2026-02-18 00:33:46 +01:00
Raphire
bffa6dfc3e Update app name/descriptions 2026-02-18 00:30:02 +01:00
Raphire
754c3cee4c Improve app page with table-like structure 2026-02-18 00:26:10 +01:00
Raphire
f47b0531a4 Update app tooltip descriptions 2026-02-17 00:11:55 +01:00
6 changed files with 163 additions and 58 deletions

View File

@@ -236,15 +236,15 @@
"SelectedByDefault": true
},
{
"FriendlyName": "MS Teams (Old)",
"FriendlyName": "Microsoft Teams (Old)",
"AppId": "MicrosoftTeams",
"Description": "Old MS Teams personal (MS Store version)",
"Description": "Old Microsoft Teams personal (MS Store version)",
"SelectedByDefault": true
},
{
"FriendlyName": "MS Teams (New)",
"FriendlyName": "Microsoft Teams (New)",
"AppId": "MSTeams",
"Description": "New MS Teams app (Work/School or Personal)",
"Description": "New Microsoft Teams app (Work/School or Personal)",
"SelectedByDefault": true
},
{
@@ -664,7 +664,7 @@
{
"FriendlyName": "Xbox TCUI Framework",
"AppId": "Microsoft.Xbox.TCUI",
"Description": "UI framework, seems to be required for MS store, photos and certain games",
"Description": "UI framework, seems to be required for Microsoft Store, photos and certain games",
"SelectedByDefault": false
},
{

View File

@@ -344,7 +344,7 @@
{
"FeatureId": "DisableTelemetry",
"Label": "telemetry, tracking & targeted ads",
"ToolTip": "This settings disables telemetry, diagnostic data collection, activity history, app-launch tracking and targeted ads. This limits the data that is sent to Microsoft about your device and usage.",
"ToolTip": "This setting disables telemetry, diagnostic data collection, activity history, app-launch tracking, targeted ads and more. It limits the data that is sent to Microsoft about your device and usage.",
"Category": "Privacy & Suggested Content",
"Action": "Disable",
"RegistryKey": "Disable_Telemetry.reg",
@@ -357,7 +357,7 @@
{
"FeatureId": "DisableSuggestions",
"Label": "tips, tricks & suggested content throughout Windows",
"ToolTip": "This will disable various tips, tricks, suggestions and ads throughout Windows.",
"ToolTip": "This setting removes many annoying distractions from Windows.",
"Category": "Privacy & Suggested Content",
"Action": "Disable",
"RegistryKey": "Disable_Windows_Suggestions.reg",
@@ -409,7 +409,7 @@
{
"FeatureId": "DisableCopilot",
"Label": "Microsoft Copilot",
"ToolTip": "This will turn off and uninstall Microsoft Copilot, the AI assistant integrated throughout Windows.",
"ToolTip": "This will disable and uninstall Microsoft Copilot, Windows' built-in AI assistant.",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_Copilot.reg",
@@ -422,7 +422,7 @@
{
"FeatureId": "DisableRecall",
"Label": "Windows Recall",
"ToolTip": "This will turn off Windows Recall, an AI-powered feature that provides quick access to recently used files, apps and activities.",
"ToolTip": "This will disable Windows Recall, an AI-powered feature that provides quick access to recently used files, apps and activities.",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_AI_Recall.reg",
@@ -435,7 +435,7 @@
{
"FeatureId": "DisableClickToDo",
"Label": "Click To Do, AI text & image analysis",
"ToolTip": "This will turn off Click To Do, which provides AI-powered text and image analysis features in Windows.",
"ToolTip": "This will disable Click To Do, which provides AI-powered text and image analysis features in Windows.",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_Click_to_Do.reg",
@@ -448,7 +448,7 @@
{
"FeatureId": "DisableDVR",
"Label": "Xbox game/screen recording",
"ToolTip": "This will turn off the Xbox game/screen recording features included with the Game Bar app.",
"ToolTip": "This will disable the Xbox game/screen recording features included with the Game Bar app.",
"Category": "Gaming",
"Action": "Disable",
"RegistryKey": "Disable_DVR.reg",
@@ -461,7 +461,7 @@
{
"FeatureId": "DisableGameBarIntegration",
"Label": "Game Bar integration",
"ToolTip": "This will turn off the Game Bar integration features such as the Game Bar overlay that appears when pressing Win+G.",
"ToolTip": "This will disable the Game Bar integration with games and controllers. This stops annoying ms-gamebar popups when launching games or connecting a controller.",
"Category": "Gaming",
"Action": "Disable",
"RegistryKey": "Disable_Game_Bar_Integration.reg",
@@ -548,7 +548,7 @@
{
"FeatureId": "DisableStartPhoneLink",
"Label": "Phone Link integration in the start menu",
"ToolTip": "This will remove the Phone Link integration that appears in the start menu when you have a mobile device linked to your PC.",
"ToolTip": "This will remove the Phone Link integration in the start menu when you have a mobile device linked to your PC.",
"Category": "Start Menu",
"Action": "Disable",
"RegistryKey": "Disable_Phone_Link_In_Start.reg",
@@ -626,7 +626,7 @@
{
"FeatureId": "EnableDarkMode",
"Label": "theme for system and apps",
"ToolTip": "This will set the default app mode and system theme to dark mode, which changes the appearance of Windows and supported apps.",
"ToolTip": "This will set the app and system theme to dark mode.",
"Category": "Appearance",
"Action": "Enable dark",
"RegistryKey": "Enable_Dark_Mode.reg",
@@ -665,7 +665,7 @@
{
"FeatureId": "DisableMouseAcceleration",
"Label": "Enhance Pointer Precision (mouse acceleration)",
"ToolTip": "By default, Windows has a mouse acceleration enabled, which can make the mouse movement less predictable, especially for gaming. Disabling this will make the mouse movement more consistent.",
"ToolTip": "This will disable mouse acceleration which is enabled by default in Windows. This makes mouse movement more consistent and predictable.",
"Category": "System",
"Action": "Disable",
"RegistryKey": "Disable_Enhance_Pointer_Precision.reg",
@@ -781,7 +781,7 @@
{
"FeatureId": "TaskbarAlignLeft",
"Label": "taskbar alignment",
"ToolTip": "By default, Windows 11 has the taskbar buttons centered. Enabling this will align the taskbar buttons to the left, similar to previous versions of Windows.",
"ToolTip": "By default, Windows 11 has the taskbar buttons centered. Enabling this setting will move the taskbar buttons to the left, similar to previous versions of Windows.",
"Category": "Taskbar",
"Priority": 1,
"Action": "Left",
@@ -911,7 +911,7 @@
{
"FeatureId": "DisableModernStandbyNetworking",
"Label": "Modern Standby network connectivity",
"ToolTip": "By default, devices that support Modern Standby maintain network connectivity while in sleep mode to allow for features like receiving calls or messages while asleep. Disabling network connectivity during Modern Standby can help save battery life.",
"ToolTip": "By default, devices that support Modern Standby maintain network connectivity while in sleep mode. Disabling network connectivity during Modern Standby can help save battery life.",
"Category": "System",
"Action": "Disable",
"RegistryKey": "Disable_Modern_Standby_Networking.reg",
@@ -924,7 +924,7 @@
{
"FeatureId": "EnableEndTask",
"Label": "'End Task' option in taskbar context menu",
"ToolTip": "When enabled, adds an 'End Task' option to the right-click context menu for apps in the taskbar, allowing you to quickly force close apps without opening Task Manager.",
"ToolTip": "When enabled, adds an 'End Task' option to the right-click context menu for apps in the taskbar, allowing you to quickly force close apps.",
"Category": "Taskbar",
"Priority": 6,
"Action": "Show",
@@ -938,7 +938,7 @@
{
"FeatureId": "EnableLastActiveClick",
"Label": "'Last Active Click' behavior for taskbar apps",
"ToolTip": "When enabled, clicking on an app in the taskbar will switch to the last active window of that app, instead of showing the thumbnail preview.",
"ToolTip": "When enabled, clicking on an app in the taskbar will switch to the last active window of that app, instead of only showing the thumbnail preview.",
"Category": "Taskbar",
"Priority": 7,
"Action": "Enable",
@@ -1121,7 +1121,7 @@
{
"FeatureId": "ShowHiddenFolders",
"Label": "hidden files, folders and drives",
"ToolTip": "By default, Windows hides certain files, folders and drives to prevent accidental modification or deletion. Enabling this will show hidden files, folders and drives in File Explorer.",
"ToolTip": "By default, Windows hides certain files, folders and drives to prevent accidental modification or deletion. Turn this on to show all files in File Explorer.",
"Category": "File Explorer",
"Action": "Show",
"RegistryKey": "Show_Hidden_Folders.reg",
@@ -1160,7 +1160,7 @@
{
"FeatureId": "HideDupliDrive",
"Label": "duplicate removable drive entries",
"ToolTip": "When you connect a removable drive, Windows shows the drive both under 'This PC' and in the navigation pane with its own entry. Hiding duplicate removable drive entries will only show the drive under 'This PC' and remove it from the navigation pane.",
"ToolTip": "By default, Windows shows removable drives both under 'This PC' and in the navigation pane with its own entry. Enable this setting to only show removable drives under 'This PC'.",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Hide_duplicate_removable_drives_from_navigation_pane_of_File_Explorer.reg",
@@ -1199,7 +1199,7 @@
{
"FeatureId": "DisableAnimations",
"Label": "animations and visual effects",
"ToolTip": "This will disable animations and some visual effects in Windows, which can make the interface feel snappier and more responsive, especially on older hardware.",
"ToolTip": "This will disable animations and some visual effects in Windows, which can make the interface feel snappier, especially on older hardware.",
"Category": "Appearance",
"Action": "Disable",
"RegistryKey": "Disable_Animations.reg",
@@ -1341,7 +1341,7 @@
{
"FeatureId": "DisableBraveBloat",
"Label": "bloat in Brave browser (AI, Crypto, etc.)",
"ToolTip": "This will turn off Brave's built-in AI features, Crypto wallet, News, Rewards, Talk and VPN.",
"ToolTip": "This will disable Brave's built-in AI features, Crypto wallet, News, Rewards, Talk and VPN.",
"Category": "Other",
"Action": "Disable",
"RegistryKey": "Disable_Brave_Bloat.reg",

View File

@@ -1,8 +1,8 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Win11Debloat"
MinWidth="1024" MinHeight="600"
MaxWidth="1280"
MinWidth="1080" MinHeight="600"
MaxWidth="1400"
ResizeMode="CanResize"
SnapsToDevicePixels="True"
WindowStartupLocation="CenterScreen"
@@ -420,8 +420,35 @@
<!-- CheckBox style for apps panels -->
<Style x:Key="AppsPanelCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
<Setter Property="Margin" Value="2,3,2,3"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<!-- TextBlock style for App ID column in apps table -->
<Style x:Key="AppIdTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource AppIdColor}"/>
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!-- TextBlock style for App Name column in apps table -->
<Style x:Key="AppNameTextStyle" TargetType="TextBlock">
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!-- TextBlock style for Description column in apps table -->
<Style x:Key="AppDescTextStyle" TargetType="TextBlock">
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="8,0,8,0"/>
</Style>
<!-- Column widths for the apps table row grid -->
<GridLength x:Key="AppTableCol0Width">160</GridLength>
<GridLength x:Key="AppTableCol1Width">1*</GridLength>
<GridLength x:Key="AppTableCol2Width">286</GridLength>
<!-- Button Style -->
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ButtonBg}"/>
@@ -826,16 +853,36 @@
</Grid.RowDefinitions>
<!-- Apps List -->
<Border Grid.Row="0" BorderBrush="{DynamicResource BorderColor}" CornerRadius="4" BorderThickness="1" Margin="20,0,20,10" Background="{DynamicResource CardBgColor}">
<Grid>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel x:Name="AppSelectionPanel" Margin="8"/>
</ScrollViewer>
<Border x:Name="LoadingAppsIndicator" CornerRadius="4" Background="{DynamicResource ScrollBarThumbColor}" Opacity="0.8" Visibility="Collapsed">
<TextBlock Text="Loading apps..." FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource FgColor}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
<Grid Grid.Row="0" Margin="20,0,20,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Column Headers -->
<Border Grid.Row="0" Background="{DynamicResource TableHeaderColor}" BorderBrush="{DynamicResource BorderColor}" BorderThickness="1,1,1,0" CornerRadius="4,4,0,0">
<Grid Margin="26,6,8,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="160"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Name" FontWeight="SemiBold" FontSize="16" Foreground="{DynamicResource FgColor}" Margin="16,0,0,0"/>
<TextBlock Grid.Column="1" Text="Description" FontWeight="SemiBold" FontSize="16" Foreground="{DynamicResource FgColor}" Margin="24,0,0,0"/>
<TextBlock Grid.Column="2" Text="App ID" FontWeight="SemiBold" FontSize="16" Foreground="{DynamicResource FgColor}"/>
</Grid>
</Border>
<!-- Apps content -->
<Border Grid.Row="1" BorderBrush="{DynamicResource BorderColor}" CornerRadius="0,0,4,4" BorderThickness="1" Background="{DynamicResource CardBgColor}">
<Grid>
<ScrollViewer VerticalScrollBarVisibility="Visible">
<StackPanel x:Name="AppSelectionPanel" Margin="10,4,0,4"/>
</ScrollViewer>
<Border x:Name="LoadingAppsIndicator" CornerRadius="0,0,4,4" Background="{DynamicResource CardBgColor}" Opacity="0.8" Visibility="Collapsed">
<TextBlock Text="Loading apps..." FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource FgColor}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Grid>
<!-- Status Info -->
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,0,20,0">

View File

@@ -28,11 +28,13 @@ function LoadAppsDetailsFromJson {
}
}
$friendlyName = if ($appData.FriendlyName) { $appData.FriendlyName } else { $appId }
$displayName = if ($appData.FriendlyName) { "$($appData.FriendlyName) ($appId)" } else { $appId }
$isChecked = if ($InitialCheckedFromJson) { $appData.SelectedByDefault } else { $false }
$apps += [PSCustomObject]@{
AppId = $appId
FriendlyName = $friendlyName
DisplayName = $displayName
IsChecked = $isChecked
Description = $appData.Description

View File

@@ -30,6 +30,10 @@ function SetWindowThemeResources {
$window.Resources.Add("InputFocusColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#1f1f1f")))
$window.Resources.Add("ScrollBarThumbColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#3d3d3d")))
$window.Resources.Add("ScrollBarThumbHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#4b4b4b")))
$window.Resources.Add("AppIdColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#afafaf")))
$window.Resources.Add("SearchHighlightColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#4A4A2A")))
$window.Resources.Add("SearchHighlightActiveColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#8A7000")))
$window.Resources.Add("TableHeaderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#333333")))
}
else {
$window.Resources.Add("BgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f3f3f3")))
@@ -56,6 +60,10 @@ function SetWindowThemeResources {
$window.Resources.Add("InputFocusColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#fbfbfb")))
$window.Resources.Add("ScrollBarThumbColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#b9b9b9")))
$window.Resources.Add("ScrollBarThumbHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#8b8b8b")))
$window.Resources.Add("AppIdColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#666666")))
$window.Resources.Add("SearchHighlightColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFF4CE")))
$window.Resources.Add("SearchHighlightActiveColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFD966")))
$window.Resources.Add("TableHeaderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#ffffff")))
}
$window.Resources.Add("ButtonBg", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#0067c0")))

View File

@@ -534,16 +534,45 @@ function Show-MainWindow {
$script:MainWindowLastSelectedCheckbox = $null
# Sort apps alphabetically and add to panel
$appsToAdd | Sort-Object -Property DisplayName | ForEach-Object {
$appsToAdd | Sort-Object -Property FriendlyName | ForEach-Object {
$checkbox = New-Object System.Windows.Controls.CheckBox
$checkbox.Content = $_.DisplayName
$checkbox.SetValue([System.Windows.Automation.AutomationProperties]::NameProperty, $_.DisplayName)
$checkbox.SetValue([System.Windows.Automation.AutomationProperties]::NameProperty, $_.FriendlyName)
$checkbox.Tag = $_.AppId
$checkbox.IsChecked = $_.IsChecked
$checkbox.ToolTip = $_.Description
$checkbox.Style = $window.Resources["AppsPanelCheckBoxStyle"]
# Build table row content: App Name | Description | App ID
$row = New-Object System.Windows.Controls.Grid
$c0 = New-Object System.Windows.Controls.ColumnDefinition; $c0.Width = [System.Windows.GridLength]::new(160)
$c1 = New-Object System.Windows.Controls.ColumnDefinition; $c1.Width = [System.Windows.GridLength]::new(1, [System.Windows.GridUnitType]::Star)
$c2 = New-Object System.Windows.Controls.ColumnDefinition; $c2.Width = [System.Windows.GridLength]::new(286)
$row.ColumnDefinitions.Add($c0); $row.ColumnDefinitions.Add($c1); $row.ColumnDefinitions.Add($c2)
$tbName = New-Object System.Windows.Controls.TextBlock
$tbName.Text = $_.FriendlyName
$tbName.Style = $window.Resources["AppNameTextStyle"]
[System.Windows.Controls.Grid]::SetColumn($tbName, 0)
$tbDesc = New-Object System.Windows.Controls.TextBlock
$tbDesc.Text = $_.Description
$tbDesc.Style = $window.Resources["AppDescTextStyle"]
$tbDesc.ToolTip = $_.Description
[System.Windows.Controls.Grid]::SetColumn($tbDesc, 1)
$tbId = New-Object System.Windows.Controls.TextBlock
$tbId.Text = $_.AppId
$tbId.Style = $window.Resources["AppIdTextStyle"]
$tbId.ToolTip = $_.AppId
[System.Windows.Controls.Grid]::SetColumn($tbId, 2)
$row.Children.Add($tbName) | Out-Null
$row.Children.Add($tbDesc) | Out-Null
$row.Children.Add($tbId) | Out-Null
$checkbox.Content = $row
# Store metadata in checkbox for later use
Add-Member -InputObject $checkbox -MemberType NoteProperty -Name "AppName" -Value $_.FriendlyName
Add-Member -InputObject $checkbox -MemberType NoteProperty -Name "AppDescription" -Value $_.Description
Add-Member -InputObject $checkbox -MemberType NoteProperty -Name "SelectedByDefault" -Value $_.SelectedByDefault
# Add event handler to update status
@@ -674,16 +703,6 @@ function Show-MainWindow {
}
})
# Shared search highlighting configuration
$script:SearchHighlightColor = [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFF4CE"))
$script:SearchHighlightColorDark = [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#4A4A2A"))
# Helper function to get the appropriate highlight brush based on theme
function GetSearchHighlightBrush {
if ($usesDarkMode) { return $script:SearchHighlightColorDark }
return $script:SearchHighlightColor
}
# Helper function to scroll to an item if it's not visible, centering it in the viewport
function ScrollToItemIfNotVisible {
param (
@@ -737,6 +756,10 @@ function Show-MainWindow {
$appSearchBox = $window.FindName('AppSearchBox')
$appSearchPlaceholder = $window.FindName('AppSearchPlaceholder')
# Track current search matches and active index for Enter-key navigation
$script:AppSearchMatches = @()
$script:AppSearchMatchIndex = -1
$appSearchBox.Add_TextChanged({
$searchText = $appSearchBox.Text.ToLower().Trim()
@@ -750,29 +773,54 @@ function Show-MainWindow {
}
}
$script:AppSearchMatches = @()
$script:AppSearchMatchIndex = -1
if ([string]::IsNullOrWhiteSpace($searchText)) { return }
# Find and highlight all matching apps
$firstMatch = $null
$highlightBrush = GetSearchHighlightBrush
$highlightBrush = $window.Resources["SearchHighlightColor"]
$activeHighlightBrush = $window.Resources["SearchHighlightActiveColor"]
foreach ($child in $appsPanel.Children) {
if ($child -is [System.Windows.Controls.CheckBox] -and $child.Visibility -eq 'Visible') {
if ($child.Content.ToString().ToLower().Contains($searchText)) {
$appName = if ($child.AppName) { $child.AppName } else { '' }
$appId = if ($child.Tag) { $child.Tag.ToString() } else { '' }
$appDesc = if ($child.AppDescription) { $child.AppDescription } else { '' }
if ($appName.ToLower().Contains($searchText) -or $appId.ToLower().Contains($searchText) -or $appDesc.ToLower().Contains($searchText)) {
$child.Background = $highlightBrush
if ($null -eq $firstMatch) { $firstMatch = $child }
$script:AppSearchMatches += $child
}
}
}
# Scroll to first match if not visible
if ($firstMatch) {
# Scroll to first match and mark it as active
if ($script:AppSearchMatches.Count -gt 0) {
$script:AppSearchMatchIndex = 0
$script:AppSearchMatches[0].Background = $activeHighlightBrush
$scrollViewer = FindParentScrollViewer -element $appsPanel
if ($scrollViewer) {
ScrollToItemIfNotVisible -scrollViewer $scrollViewer -item $firstMatch -container $appsPanel
ScrollToItemIfNotVisible -scrollViewer $scrollViewer -item $script:AppSearchMatches[0] -container $appsPanel
}
}
})
$appSearchBox.Add_KeyDown({
param($sender, $e)
if ($e.Key -eq [System.Windows.Input.Key]::Enter -and $script:AppSearchMatches.Count -gt 0) {
# Reset background of current active match
$script:AppSearchMatches[$script:AppSearchMatchIndex].Background = $window.Resources["SearchHighlightColor"]
# Advance to next match (wrapping)
$script:AppSearchMatchIndex = ($script:AppSearchMatchIndex + 1) % $script:AppSearchMatches.Count
# Highlight new active match
$script:AppSearchMatches[$script:AppSearchMatchIndex].Background = $window.Resources["SearchHighlightActiveColor"]
$scrollViewer = FindParentScrollViewer -element $appsPanel
if ($scrollViewer) {
ScrollToItemIfNotVisible -scrollViewer $scrollViewer -item $script:AppSearchMatches[$script:AppSearchMatchIndex] -container $appsPanel
}
$e.Handled = $true
}
})
# Tweak Search Box functionality
$tweakSearchBox = $window.FindName('TweakSearchBox')
@@ -835,7 +883,7 @@ function Show-MainWindow {
# Find and highlight all matching tweaks
$firstMatch = $null
$highlightBrush = GetSearchHighlightBrush
$highlightBrush = $window.Resources["SearchHighlightColor"]
$columns = @($col0, $col1, $col2) | Where-Object { $_ -ne $null }
foreach ($column in $columns) {