mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-09 09:31:15 +10:00
Replace the FOSS dot with a corner badge on app entries (#4924)
* Replace FOSS dot with a corner badge on app entries - Add New-WinUtilFossBadge, the open source keyhole on a green backdrop - Mark FOSS apps with a corner triangle instead of a dot after the name - Give the FOSS legend a circle badge and move it below the buttons - Sort Note entries last, they shared a rank with checkboxes before Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Update functions/private/Initialize-InstallAppEntry.ps1 Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Opus 5
coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
parent
f7c072341d
commit
8d3adb599f
@@ -143,11 +143,12 @@ function Invoke-WPFUIElements {
|
||||
$itemsControl.Items.Add($label) | Out-Null
|
||||
$sync[$category] = $label
|
||||
|
||||
# Sort entries by type (checkboxes first, then buttons, then comboboxes) and then alphabetically by Content
|
||||
# Sort entries by type (checkboxes first, then buttons, then comboboxes, notes last) and then alphabetically by Content
|
||||
$entries = $organizedData[$panelKey][$category] | Sort-Object @{Expression = {
|
||||
switch ($_.Type) {
|
||||
'Button' { 1 }
|
||||
'Combobox' { 2 }
|
||||
'Note' { 3 }
|
||||
default { 0 }
|
||||
}
|
||||
}}, Content
|
||||
@@ -364,17 +365,15 @@ function Invoke-WPFUIElements {
|
||||
$textBlock.Margin = "5,5,5,5"
|
||||
$textBlock.UseLayoutRounding = $true
|
||||
|
||||
$bulletRun = New-Object Windows.Documents.Run
|
||||
$bulletRun.Text = [char]0x25CF
|
||||
$bulletRun.Foreground = [Windows.Media.SolidColorBrush]::new([Windows.Media.Color]::FromRgb(110, 255, 114))
|
||||
$bulletRun.FontSize = 11.5
|
||||
$bulletBadge = [Windows.Documents.InlineUIContainer]::new((New-WinUtilFossBadge -Size 18 -Round))
|
||||
$bulletBadge.BaselineAlignment = [Windows.BaselineAlignment]::Center
|
||||
|
||||
$textRun = New-Object Windows.Documents.Run
|
||||
$textRun.Text = " $($entryInfo.Content)"
|
||||
$textRun.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "FontSize")
|
||||
$textRun.Foreground = [Windows.Media.SolidColorBrush]::new([Windows.Media.Color]::FromRgb(19, 143, 83))
|
||||
|
||||
$textBlock.Inlines.Add($bulletRun)
|
||||
$textBlock.Inlines.Add($bulletBadge)
|
||||
$textBlock.Inlines.Add($textRun)
|
||||
|
||||
$itemsControl.Items.Add($textBlock) | Out-Null
|
||||
|
||||
Reference in New Issue
Block a user