From 7be315107e4fdb8caf0259d3824b2a6ddbcb4667 Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Sun, 1 Feb 2015 15:46:46 +0000 Subject: [PATCH] contrib/InfoPanel: added text decoration git-svn-id: https://svn.fhem.de/fhem/trunk@7821 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/InfoPanel/55_InfoPanel.pm | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/fhem/contrib/InfoPanel/55_InfoPanel.pm b/fhem/contrib/InfoPanel/55_InfoPanel.pm index fd1ea6163..a1f79bff2 100644 --- a/fhem/contrib/InfoPanel/55_InfoPanel.pm +++ b/fhem/contrib/InfoPanel/55_InfoPanel.pm @@ -423,8 +423,12 @@ sub btIP_itemText { my $output = "\n$text\n\n"; @@ -638,6 +642,9 @@ sub btIP_evalLayout($$@) { $params{padding} = 0; $params{xx}= 0; $params{yy}= 0; + $params{fontstyle} = "initial"; + $params{fontweight} = "normal"; + $params{textdecoration} = "none"; $defs{$name}{fhem}{div} = undef; @@ -849,6 +856,24 @@ sub btIP_evalLayout($$@) { when("textboxalign") { $params{tbalign} = $def; } + + when("textdesign") { + my @args = split(/,/,$def); + my @deco = qw(underline overline line-through); #text-decoration + my @style = qw(italic oblique); #font-style + my @weight = qw(bold); #font-weight + $params{fontstyle} = "initial"; + $params{fontweight} = "initial"; + $params{textdecoration} = "none"; + + foreach my $s (@args) { + if($s ne 'clear') { + $params{fontstyle} = "$s " if($s ~~ @style); + $params{fontweight} = "$s " if($s ~~ @weight); + $params{textdecoration} = "$s " if($s ~~ @deco); + } + } + } when("time") { ($id,$x,$y)= split("[ \t]+", $def, 3);