mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-10 18:11:16 +10:00
Turn the Install category filters into toggle chips (#4926)
* Turn the Install category filters into toggle chips - Replace the filter buttons with toggles that show which ones are active - Add ctrl click to select more than one category - Keep the search box and the category filter independent of each other - Expand matching categories while a filter is active * Fix the filter interactions the category chips missed - Pass the selected categories to the lazy rendering batches, the old call used a parameter that no longer exists and threw while typing - Keep the category filter when switching tabs, the chips stayed checked while the filter itself was dropped - Put a category back to collapsed once the filter that expanded it is gone * Document the Install category filters - Add a guide section for the chips, ctrl click and clearing the filter - Note that search and the category chips apply together * Correct the category filter guide wording - Clearing by clicking the chip only applies when it is the only one selected - Only categories with matches expand, and only auto expanded ones re-collapse
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
function Invoke-WinUtilAppCategoryChip {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Handles a click on an Install tab category chip
|
||||
|
||||
.DESCRIPTION
|
||||
The chip carries its category in Tag, so every chip shares this handler. Holding ctrl
|
||||
adds the category to the current selection instead of replacing it.
|
||||
|
||||
.PARAMETER Chip
|
||||
The chip that was clicked
|
||||
#>
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
$Chip
|
||||
)
|
||||
|
||||
$ctrlDown = [bool]([System.Windows.Input.Keyboard]::Modifiers -band [System.Windows.Input.ModifierKeys]::Control)
|
||||
Set-WinUtilAppCategoryFilter -Category $Chip.Tag -Additive:$ctrlDown
|
||||
}
|
||||
Reference in New Issue
Block a user