2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

55_InfoPanel: add opacity for longpoll text

git-svn-id: https://svn.fhem.de/fhem/trunk@8104 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2015-02-27 14:43:02 +00:00
parent 1b8f6e621a
commit aeab708e66

View File

@ -48,7 +48,7 @@
# 2015-02-25 - - changed: iframe handling for secret div
#
##############################################
# $Id$
# $Id: 55_InfoPanel.pm 8095 2015-02-25 10:33:21Z betateilchen $
package main;
use strict;
@ -502,8 +502,9 @@ sub btIP_itemLongpoll {
my ($iconName,undef,undef) = FW_dev2image($id);
my $iconURL = FW_IconURL($iconName);
my $color = substr($params{rgb},0,6);
my $opacity = hex(substr($params{rgb},6,2))/255;
my $output = "<div informId=\"$id\" style=\"position:absolute; top:${y}px; left:${x}px; ";
$output .= "font-family:$params{font}; font-size:$params{pt}; color:#$color; " if defined($text);
$output .= "font-family:$params{font}; font-size:$params{pt}; color:#$color; opacity:$opacity; " if defined($text);
$output .= "margin-top:0px; z-index:3; \" >\n";
$output .= "$text\n" if defined($text);
$output .= "<img src=\"$iconURL\">\n" unless defined($text);