Clean up styling to better match Windows fluent design guidelines (#638)

This commit is contained in:
Jeffrey
2026-06-21 18:47:52 +02:00
committed by GitHub
parent 91a6266d50
commit a89b53504c
18 changed files with 546 additions and 469 deletions

View File

@@ -87,27 +87,27 @@ function Show-MessageBox {
switch ($Icon) {
'Information' {
$iconText.Text = [char]0xE946
$iconText.Foreground = $msgWindow.FindResource('InformationIconColor')
$iconText.Foreground = $msgWindow.FindResource('IconInformationColor')
$iconText.Visibility = 'Visible'
}
'Success' {
$iconText.Text = [char]0xE73E
$iconText.Foreground = $msgWindow.FindResource('SuccessIconColor')
$iconText.Foreground = $msgWindow.FindResource('IconSuccessColor')
$iconText.Visibility = 'Visible'
}
'Warning' {
$iconText.Text = [char]0xE7BA
$iconText.Foreground = $msgWindow.FindResource('WarningIconColor')
$iconText.Foreground = $msgWindow.FindResource('IconWarningColor')
$iconText.Visibility = 'Visible'
}
'Error' {
$iconText.Text = [char]0xEA39
$iconText.Foreground = $msgWindow.FindResource('ErrorIconColor')
$iconText.Foreground = $msgWindow.FindResource('IconErrorColor')
$iconText.Visibility = 'Visible'
}
'Question' {
$iconText.Text = [char]0xE897
$iconText.Foreground = $msgWindow.FindResource('QuestionIconColor')
$iconText.Foreground = $msgWindow.FindResource('IconQuestionColor')
$iconText.Visibility = 'Visible'
}
default {
@@ -121,6 +121,8 @@ function Show-MessageBox {
$button1.Content = 'OK'
$button1.Add_Click({ $msgWindow.Tag = 'OK'; $msgWindow.Close() })
$button2.Visibility = 'Collapsed'
# Right-align sole button by moving it to column 1
[System.Windows.Controls.Grid]::SetColumn($button1, 1)
}
'OKCancel' {
$button1.Content = 'OK'