mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 17:30:37 -06:00
fix layouting
This commit is contained in:
parent
26fe1f2415
commit
7cb025621d
@ -82,7 +82,6 @@ function Invoke-WinUtilLogoviewbox {
|
||||
$canvas.Children.Add($LogoPath1) | Out-Null
|
||||
$canvas.Children.Add($LogoPath2) | Out-Null
|
||||
$canvas.Children.Add($LogoPath3) | Out-Null
|
||||
|
||||
}
|
||||
'checkmark' {
|
||||
$canvas.Width = 512
|
||||
@ -129,7 +128,6 @@ function Invoke-WinUtilLogoviewbox {
|
||||
$exclamationPath.Data = [Windows.Media.Geometry]::Parse($exclamationPathData)
|
||||
$exclamationPath.Fill = [Windows.Media.Brushes]::White # Set fill color to white
|
||||
|
||||
# Calculate the center position for the exclamation mark path
|
||||
# Get the bounds of the exclamation mark path
|
||||
$exclamationBounds = $exclamationPath.Data.Bounds
|
||||
|
||||
@ -137,8 +135,6 @@ function Invoke-WinUtilLogoviewbox {
|
||||
$exclamationCenterX = ($canvas.Width - $exclamationBounds.Width) / 2 - $exclamationBounds.X
|
||||
$exclamationPath.SetValue([Windows.Controls.Canvas]::LeftProperty, $exclamationCenterX)
|
||||
|
||||
|
||||
|
||||
# Define the rounded rectangle at the bottom (dot of exclamation mark)
|
||||
$roundedRectangle = New-Object Windows.Shapes.Rectangle
|
||||
$roundedRectangle.Width = 80
|
||||
@ -152,14 +148,10 @@ function Invoke-WinUtilLogoviewbox {
|
||||
$roundedRectangle.SetValue([Windows.Controls.Canvas]::LeftProperty, $centerX)
|
||||
$roundedRectangle.SetValue([Windows.Controls.Canvas]::TopProperty, 324.34)
|
||||
|
||||
|
||||
# Add the paths to the Canvas
|
||||
$canvas.Children.Add($circlePath) | Out-Null
|
||||
$canvas.Children.Add($exclamationPath) | Out-Null
|
||||
$canvas.Children.Add($roundedRectangle) | Out-Null
|
||||
|
||||
# Add the Canvas to the Viewbox
|
||||
$LogoViewbox.Child = $canvas
|
||||
}
|
||||
default {
|
||||
Write-Host "Invalid type: $type"
|
||||
|
Loading…
Reference in New Issue
Block a user