mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-09 17:41:14 +10:00
Rework foss filtering (#4696)
* Replace FOSS highlight toggle with inline label Remove the separate "Highlight FOSS" toggle and its theming logic, and instead append an inline "- FOSS" label to FOSS app entries. Changes: remove WPFToggleFOSSHighlight from app navigation and related event handlers, delete FOSSColor resource updates in theme code and button handler, simplify checkbox setup in Invoke-WPFUIElements by removing the special-case toggle logic, and update Initialize-InstallAppEntry to build a horizontal panel containing the app name plus a small green "- FOSS" TextBlock for FOSS items. This consolidates FOSS indication into the item UI and cleans up toggle/theme handling. * Add inline FOSS label to app entries Replace the separate StackPanel/TextBlock used for the FOSS indicator with an inline System.Windows.Documents.Run appended to the app name. The run is styled (green RGB(76,175,80) and FontSize=10) and the checkbox content assignment was moved outside the conditional so the appName (with optional FOSS run) is always used. Cleaned up related comments to reflect the FOSS label change. * Add FOSS note type with green bullet Added FOSS notes in the UI and FOSS labels with a green bullet instead of the text '#FOSS' * Use larger circle glyph; remove italic text Replaced the FOSS and list bullet glyphs with a larger circle for better visual consistency and removed the italic styling * Update FOSS/bullet glyphs, colors and sizes Updated FOSS/list bullet styling by switching glyphs from U+2B24 to U+25CF, increasing size (10→11.5), and adjusting bullet/text colors for better visibility and consistency across.
This commit is contained in:
@@ -63,13 +63,14 @@ function Initialize-InstallAppEntry {
|
||||
$appName.Style = $sync.Form.Resources.AppEntryNameStyle
|
||||
$appName.Text = $Apps.$appKey.content
|
||||
|
||||
# Change color to Green if FOSS
|
||||
# Add FOSS label after the name if FOSS
|
||||
if ($Apps.$appKey.foss -eq $true) {
|
||||
$appName.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "FOSSColor")
|
||||
$appName.FontWeight = "Bold"
|
||||
}
|
||||
$fossRun = [System.Windows.Documents.Run]::new(" $([char]0x25CF)")
|
||||
$fossRun.Foreground = [Windows.Media.SolidColorBrush]::new([Windows.Media.Color]::FromRgb(110, 255, 114))
|
||||
$fossRun.FontSize = 11.5
|
||||
|
||||
# Add the name to the Checkbox
|
||||
[void]$appName.Inlines.Add($fossRun)
|
||||
}
|
||||
$checkBox.Content = $appName
|
||||
|
||||
# Add accessibility properties to make the elements screen reader friendly
|
||||
|
||||
Reference in New Issue
Block a user