correcting/theming icons
BIN
resources/img/average-dark-16.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
resources/img/average-dark-32.png
Normal file
After Width: | Height: | Size: 791 B |
BIN
resources/img/average-dark-64.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
resources/img/check-dark-16.png
Normal file
After Width: | Height: | Size: 307 B |
BIN
resources/img/check-dark-32.png
Normal file
After Width: | Height: | Size: 449 B |
BIN
resources/img/check-dark-64.png
Normal file
After Width: | Height: | Size: 940 B |
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 927 B |
BIN
resources/img/circle-dark-16.png
Normal file
After Width: | Height: | Size: 389 B |
BIN
resources/img/circle-dark-32.png
Normal file
After Width: | Height: | Size: 722 B |
BIN
resources/img/circle-dark-64.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 389 B After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
resources/img/circledots-dark-16.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
resources/img/circledots-dark-32.png
Normal file
After Width: | Height: | Size: 773 B |
BIN
resources/img/circledots-dark-64.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 394 B |
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 773 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
resources/img/clipboarddata-dark-16.png
Normal file
After Width: | Height: | Size: 320 B |
BIN
resources/img/clipboarddata-dark-32.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
resources/img/clipboarddata-dark-64.png
Normal file
After Width: | Height: | Size: 969 B |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 989 B |
BIN
resources/img/download-dark-16.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
resources/img/download-dark-32.png
Normal file
After Width: | Height: | Size: 556 B |
BIN
resources/img/download-dark-64.png
Normal file
After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 571 B After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 1,006 B After Width: | Height: | Size: 1,006 B |
BIN
resources/img/eye-dark-16.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
resources/img/eye-dark-32.png
Normal file
After Width: | Height: | Size: 729 B |
BIN
resources/img/eye-dark-64.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 733 B After Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
resources/img/flag-dark-16.png
Normal file
After Width: | Height: | Size: 293 B |
BIN
resources/img/flag-dark-32.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
resources/img/flag-dark-64.png
Normal file
After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 475 B |
Before Width: | Height: | Size: 800 B After Width: | Height: | Size: 800 B |
BIN
resources/img/gear-dark-16.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
resources/img/gear-dark-32.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
resources/img/gear-dark-64.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 993 B After Width: | Height: | Size: 993 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
resources/img/reply-dark-16.png
Normal file
After Width: | Height: | Size: 280 B |
BIN
resources/img/reply-dark-32.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
resources/img/reply-dark-64.png
Normal file
After Width: | Height: | Size: 749 B |
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 432 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
BIN
resources/img/settings-dark-16.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
resources/img/settings-dark-32.png
Normal file
After Width: | Height: | Size: 792 B |
BIN
resources/img/settings-dark-64.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 787 B After Width: | Height: | Size: 787 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
resources/img/trash-dark-16.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
resources/img/trash-dark-32.png
Normal file
After Width: | Height: | Size: 607 B |
BIN
resources/img/trash-dark-64.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
resources/img/upload-dark-16.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
resources/img/upload-dark-32.png
Normal file
After Width: | Height: | Size: 547 B |
BIN
resources/img/upload-dark-64.png
Normal file
After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 565 B |
Before Width: | Height: | Size: 1,006 B After Width: | Height: | Size: 1,006 B |
BIN
resources/img/x-dark-16.png
Normal file
After Width: | Height: | Size: 222 B |
BIN
resources/img/x-dark-32.png
Normal file
After Width: | Height: | Size: 314 B |
BIN
resources/img/x-dark-64.png
Normal file
After Width: | Height: | Size: 632 B |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 655 B |
|
@ -1,6 +1,11 @@
|
||||||
$svgDir = "./svg"
|
$svgDir = "./svg"
|
||||||
$outDir = "./img"
|
$outDir = "./img"
|
||||||
$sizes = @(16, 32, 64)
|
$sizes = @(16, 32, 64)
|
||||||
|
$themes = @{
|
||||||
|
"light" = "#000000"
|
||||||
|
"dark" = "#ffffff"
|
||||||
|
}
|
||||||
|
$tempSvg = "temp.svg"
|
||||||
|
|
||||||
# Ensure output directory exists
|
# Ensure output directory exists
|
||||||
if (!(Test-Path -Path $outDir)) {
|
if (!(Test-Path -Path $outDir)) {
|
||||||
|
@ -13,16 +18,48 @@ if (-not (Get-Command "inkscape" -ErrorAction SilentlyContinue)) {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Process SVGs
|
# Helper: inject color into <svg> tag
|
||||||
|
function Inject-Color {
|
||||||
|
param ($original, $color)
|
||||||
|
$content = Get-Content $original -Raw
|
||||||
|
|
||||||
|
if ($content -match '<svg[^>]*>') {
|
||||||
|
# Inject color style
|
||||||
|
$patched = $content -replace '<svg([^>]*?)>', "<svg`$1 style=`"color: $color`">"
|
||||||
|
Set-Content -Path $tempSvg -Value $patched
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw "Couldn't find <svg> tag to patch."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Process each SVG file
|
||||||
Get-ChildItem -Path $svgDir -Filter *.svg | ForEach-Object {
|
Get-ChildItem -Path $svgDir -Filter *.svg | ForEach-Object {
|
||||||
$svgPath = $_.FullName
|
$svgPath = $_.FullName
|
||||||
$baseName = $_.BaseName
|
$baseName = $_.BaseName
|
||||||
|
|
||||||
|
foreach ($theme in $themes.Keys) {
|
||||||
|
$color = $themes[$theme]
|
||||||
|
|
||||||
|
# Create themed temp SVG
|
||||||
|
Inject-Color $svgPath $color
|
||||||
|
|
||||||
foreach ($size in $sizes) {
|
foreach ($size in $sizes) {
|
||||||
$outFile = Join-Path $outDir "$baseName-$size.png"
|
$outFile = Join-Path $outDir "$baseName-$theme-$size.png"
|
||||||
Write-Host "Converting $($_.Name) to $outFile ($size x $size)..."
|
Write-Host "Exporting $outFile (color $color)..."
|
||||||
& inkscape "$svgPath" --export-type=png --export-filename="$outFile" --export-width=$size --export-height=$size
|
& inkscape $tempSvg `
|
||||||
|
--export-type=png `
|
||||||
|
--export-filename="$outFile" `
|
||||||
|
--export-width=$size `
|
||||||
|
--export-height=$size `
|
||||||
|
--actions="export-do"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
if (Test-Path $tempSvg) {
|
||||||
|
Remove-Item $tempSvg -Force
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Conversion complete."
|
Write-Host "Done generating light/dark themed PNGs."
|
||||||
|
|