mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 09:20:36 -06:00
fixes
- use correct ctt blue color #0567ff - remove unneeded comments - rename Logoview to assets
This commit is contained in:
parent
7cb025621d
commit
4b741ce430
@ -1,4 +1,4 @@
|
||||
function Invoke-WinUtilLogoviewbox {
|
||||
function Invoke-WinUtilAssets {
|
||||
param (
|
||||
$type,
|
||||
$Size,
|
||||
@ -38,7 +38,7 @@ C 18.00,14.00 45.00,27.74 45.00,27.74
|
||||
"@
|
||||
$LogoPath1 = New-Object Windows.Shapes.Path
|
||||
$LogoPath1.Data = [Windows.Media.Geometry]::Parse($LogoPathData1)
|
||||
$LogoPath1.Fill = [Windows.Media.Brushes]::Blue
|
||||
$LogoPath1.Fill = [System.Windows.Media.BrushConverter]::new().ConvertFromString("#0567ff")
|
||||
|
||||
$LogoPathData2 = @"
|
||||
M 107.00,14.00
|
||||
@ -54,7 +54,7 @@ C 109.01,19.06 108.93,30.37 104.66,34.21
|
||||
"@
|
||||
$LogoPath2 = New-Object Windows.Shapes.Path
|
||||
$LogoPath2.Data = [Windows.Media.Geometry]::Parse($LogoPathData2)
|
||||
$LogoPath2.Fill = [Windows.Media.Brushes]::Blue
|
||||
$LogoPath2.Fill = [System.Windows.Media.BrushConverter]::new().ConvertFromString("#0567ff")
|
||||
|
||||
$LogoPathData3 = @"
|
||||
M 20.00,46.00
|
@ -61,13 +61,13 @@ function Set-WinUtilTaskbaritem {
|
||||
if ($overlay) {
|
||||
switch ($overlay) {
|
||||
'logo' {
|
||||
$sync["Form"].taskbarItemInfo.Overlay = (Invoke-WinUtilLogoviewbox -Type "Logo" -Size 80 -Render)
|
||||
$sync["Form"].taskbarItemInfo.Overlay = (Invoke-WinUtilAssets -Type "Logo" -Size 80 -Render)
|
||||
}
|
||||
'checkmark' {
|
||||
$sync["Form"].taskbarItemInfo.Overlay = (Invoke-WinUtilLogoviewbox -Type "checkmark" -Size 512 -Render)
|
||||
$sync["Form"].taskbarItemInfo.Overlay = (Invoke-WinUtilAssets -Type "checkmark" -Size 512 -Render)
|
||||
}
|
||||
'warning' {
|
||||
$sync["Form"].taskbarItemInfo.Overlay = (Invoke-WinUtilLogoviewbox -Type "warning" -Size 512 -Render)
|
||||
$sync["Form"].taskbarItemInfo.Overlay = (Invoke-WinUtilAssets -Type "warning" -Size 512 -Render)
|
||||
}
|
||||
'None' {
|
||||
$sync["Form"].taskbarItemInfo.Overlay = $null
|
||||
|
@ -129,7 +129,7 @@ function Show-CustomDialog {
|
||||
[Windows.Controls.Grid]::SetRow($stackPanel, 0) # Set the row to the second row (0-based index)
|
||||
|
||||
# Add SVG path to the stack panel
|
||||
$stackPanel.Children.Add((Invoke-WinUtilLogoviewbox -Type "logo" -Size 25))
|
||||
$stackPanel.Children.Add((Invoke-WinUtilAssets -Type "logo" -Size 25))
|
||||
|
||||
# Add "Winutil" text
|
||||
$winutilTextBlock = New-Object Windows.Controls.TextBlock
|
||||
|
@ -446,7 +446,7 @@ $sync["Form"].Add_Loaded({
|
||||
})
|
||||
|
||||
$NavLogoPanel = $sync["Form"].FindName("NavLogoPanel")
|
||||
$NavLogoPanel.Children.Add((Invoke-WinUtilLogoviewbox -Type "logo" -Size 25)) | Out-Null
|
||||
$NavLogoPanel.Children.Add((Invoke-WinUtilAssets -Type "logo" -Size 25)) | Out-Null
|
||||
|
||||
# Initialize the hashtable
|
||||
$winutildir = @{}
|
||||
@ -457,9 +457,6 @@ $winutildir["path"] = "$env:LOCALAPPDATA\winutil\"
|
||||
|
||||
$winutildir["logo.ico"] = $winutildir["path"] + "cttlogo.ico"
|
||||
|
||||
#$sync["Form"].Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($winutildir["logo.ico"]).ToBitmap()
|
||||
#$sync["logo.svg"] = [System.Drawing.Bitmap]::FromStream([System.IO.MemoryStream]::new([System.Convert]::FromBase64String($sync["icon.svg"])))
|
||||
|
||||
Set-WinUtilTaskbaritem -overlay "logo"
|
||||
|
||||
$sync["Form"].Add_Activated({
|
||||
|
Loading…
Reference in New Issue
Block a user