DeliveryService: Add red/white distinction to tool tips
Test / Run tests (push) Successful in 1m53s

This commit is contained in:
2026-09-16 17:28:38 +02:00
parent 0e9121c462
commit 7fef895491
2 changed files with 106 additions and 51 deletions
+3 -1
View File
@@ -13,6 +13,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace Elwig.Helpers {
public static partial class Extensions {
@@ -192,13 +193,14 @@ namespace Elwig.Helpers {
}
}
public static void AddToolTipCell(this Grid grid, string text, int row, int col, int colSpan = 1, bool bold = false, bool alignRight = false, bool alignCenter = false) {
public static void AddToolTipCell(this Grid grid, string text, int row, int col, int colSpan = 1, bool bold = false, bool alignRight = false, bool alignCenter = false, Brush? color = null) {
var tb = new TextBlock() {
Text = text,
TextAlignment = alignRight ? TextAlignment.Right : alignCenter ? TextAlignment.Center : TextAlignment.Left,
Margin = new(0, 12 * row, 0, 0),
FontWeight = bold ? FontWeights.Bold : FontWeights.Normal,
};
if (color != null) tb.Foreground = color;
tb.SetValue(Grid.ColumnProperty, col);
tb.SetValue(Grid.ColumnSpanProperty, colSpan);
grid.Children.Add(tb);