From 1b84f2d6fb8779d39bf9314561262450a01b3cde Mon Sep 17 00:00:00 2001
From: Jeffrey <9938813+Raphire@users.noreply.github.com>
Date: Wed, 7 Oct 2026 23:48:19 +0200
Subject: [PATCH] Refactor app recommendation visuals to use shapes for
improved clarity (#788)
---
Schemas/MainWindow.xaml | 17 +++++++++------
Scripts/GUI/MainWindow-AppSelection.ps1 | 28 ++++++++++++++++++-------
2 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/Schemas/MainWindow.xaml b/Schemas/MainWindow.xaml
index 7a7aa94..005d13d 100644
--- a/Schemas/MainWindow.xaml
+++ b/Schemas/MainWindow.xaml
@@ -157,18 +157,23 @@
-
+
16
180
1*
261
-
-
@@ -184,7 +189,7 @@
-
+
@@ -710,12 +715,12 @@
-
+
-
+
diff --git a/Scripts/GUI/MainWindow-AppSelection.ps1 b/Scripts/GUI/MainWindow-AppSelection.ps1
index e5d423d..501c2cc 100644
--- a/Scripts/GUI/MainWindow-AppSelection.ps1
+++ b/Scripts/GUI/MainWindow-AppSelection.ps1
@@ -431,7 +431,7 @@ function Add-AppsToMainWindow {
$checkbox.IsChecked = $app.IsChecked
$checkbox.Style = $Window.Resources['AppsPanelCheckBoxStyle']
- # Build table row: Recommendation dot | Name | Description | App ID
+ # Build table row: Recommendation indicator | Name | Description | App ID
$row = New-Object System.Windows.Controls.Grid
$row.Style = $Window.Resources['AppTableRowStyle']
$c0 = New-Object System.Windows.Controls.ColumnDefinition; $c0.Width = $Window.Resources['AppTableDotColWidth']
@@ -441,16 +441,30 @@ function Add-AppsToMainWindow {
$row.ColumnDefinitions.Add($c0); $row.ColumnDefinitions.Add($c1)
$row.ColumnDefinitions.Add($c2); $row.ColumnDefinitions.Add($c3)
- $dot = New-Object System.Windows.Shapes.Ellipse
- $dot.Style = $Window.Resources['AppRecommendationDotStyle']
- $dot.Fill = switch ($app.Recommendation) { 'safe' { $brushSafe } 'unsafe' { $brushUnsafe } default { $brushDefault } }
+ $indicator = switch ($app.Recommendation) {
+ 'safe' { New-Object System.Windows.Shapes.Ellipse }
+ 'unsafe' {
+ $triangle = New-Object System.Windows.Shapes.Polygon
+ $triangle.Points = [System.Windows.Media.PointCollection]::Parse('0,9 4.5,0 9,9')
+ $triangle.Stretch = 'Fill'
+ $triangle
+ }
+ default {
+ $diamond = New-Object System.Windows.Shapes.Polygon
+ $diamond.Points = [System.Windows.Media.PointCollection]::Parse('4.5,0 9,4.5 4.5,9 0,4.5')
+ $diamond.Stretch = 'Fill'
+ $diamond
+ }
+ }
+ $indicator.Style = $Window.Resources['AppRecommendationIndicatorStyle']
+ $indicator.Fill = switch ($app.Recommendation) { 'safe' { $brushSafe } 'unsafe' { $brushUnsafe } default { $brushDefault } }
$recommendationKey = switch ($app.Recommendation) {
'safe' { 'AppLegendRecommendedTooltip' }
'unsafe' { 'AppLegendNotRecommendedTooltip' }
default { 'AppLegendOptionalTooltip' }
}
- $dot.SetResourceReference([System.Windows.FrameworkElement]::ToolTipProperty, "Language_$recommendationKey")
- [System.Windows.Controls.Grid]::SetColumn($dot, 0)
+ $indicator.SetResourceReference([System.Windows.FrameworkElement]::ToolTipProperty, "Language_$recommendationKey")
+ [System.Windows.Controls.Grid]::SetColumn($indicator, 0)
$tbName = New-Object System.Windows.Controls.TextBlock
$tbName.Text = $app.FriendlyName
@@ -469,7 +483,7 @@ function Add-AppsToMainWindow {
$tbId.ToolTip = $app.AppIdDisplay
[System.Windows.Controls.Grid]::SetColumn($tbId, 3)
- $row.Children.Add($dot) | Out-Null
+ $row.Children.Add($indicator) | Out-Null
$row.Children.Add($tbName) | Out-Null
$row.Children.Add($tbDesc) | Out-Null
$row.Children.Add($tbId) | Out-Null