76_SolarForecast: one more fix of color filling of svg icon

git-svn-id: https://svn.fhem.de/fhem/trunk@30369 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
DS_Starter
2025-10-09 16:46:03 +00:00
parent b7956c4dee
commit d1fbce9bb2
2 changed files with 12 additions and 6 deletions

View File

@@ -160,6 +160,7 @@ BEGIN {
# Versions History intern
my %vNotesIntern = (
"1.59.2" => "09.10.2025 one more fix of color filling of svg icon ",
"1.59.1" => "08.10.2025 fixed transfer at day change, optimal SoC consideration in SoC forecast for optPower strategy ".
"__normIconInnerScale: add path color filling, Calculation of time-weighted consumption or PV generation ".
"in the current hour ",
@@ -19646,8 +19647,10 @@ sub __normIconInnerScale {
$oy += $pad;
if ($fill) {
$inner =~ s{<path(?![^>]*\bfill)}{<path fill="$fill"}g;
$inner =~ s{<path(?![^>]*\bstroke)}{<path stroke="$fill"}g;
$inner =~ s/\bfill="[^"]*"/fill="$fill"/gi;
for my $tag (qw(path rect circle ellipse polygon polyline line)) {
$inner =~ s{<$tag(?![^>]*\bfill=)}{<$tag fill="$fill"}gi;
}
}
$inner = qq{<g transform="translate($ox $oy) scale($scale)">}.$inner.'</g>'; # gib Inner-Content zurück, umgeben von der Transform-Gruppe

View File

@@ -160,6 +160,7 @@ BEGIN {
# Versions History intern
my %vNotesIntern = (
"1.59.2" => "09.10.2025 one more fix of color filling of svg icon ",
"1.59.1" => "08.10.2025 fixed transfer at day change, optimal SoC consideration in SoC forecast for optPower strategy ".
"__normIconInnerScale: add path color filling, Calculation of time-weighted consumption or PV generation ".
"in the current hour ",
@@ -19646,8 +19647,10 @@ sub __normIconInnerScale {
$oy += $pad;
if ($fill) {
$inner =~ s{<path(?![^>]*\bfill)}{<path fill="$fill"}g;
$inner =~ s{<path(?![^>]*\bstroke)}{<path stroke="$fill"}g;
$inner =~ s/\bfill="[^"]*"/fill="$fill"/gi;
for my $tag (qw(path rect circle ellipse polygon polyline line)) {
$inner =~ s{<$tag(?![^>]*\bfill=)}{<$tag fill="$fill"}gi;
}
}
$inner = qq{<g transform="translate($ox $oy) scale($scale)">}.$inner.'</g>'; # gib Inner-Content zurück, umgeben von der Transform-Gruppe