forked from openlp/openlp
- fixed alert position not being recalculated properly when changing options
bzr-revno: 1789
This commit is contained in:
commit
89eeeb6340
@ -71,11 +71,24 @@ JAVASCRIPT = """
|
|||||||
|
|
||||||
function update_css(align, font, size, color, bgcolor){
|
function update_css(align, font, size, color, bgcolor){
|
||||||
var text = document.getElementById('alert');
|
var text = document.getElementById('alert');
|
||||||
text.style.verticalAlign = align;
|
|
||||||
text.style.fontSize = size + "pt";
|
text.style.fontSize = size + "pt";
|
||||||
text.style.fontFamily = font;
|
text.style.fontFamily = font;
|
||||||
text.style.color = color;
|
text.style.color = color;
|
||||||
text.style.backgroundColor = bgcolor;
|
text.style.backgroundColor = bgcolor;
|
||||||
|
switch(align)
|
||||||
|
{
|
||||||
|
case 'top':
|
||||||
|
text.style.top = '0px';
|
||||||
|
break;
|
||||||
|
case 'middle':
|
||||||
|
text.style.top = ((window.innerHeight - text.clientHeight) / 2)
|
||||||
|
+ 'px';
|
||||||
|
break;
|
||||||
|
case 'bottom':
|
||||||
|
text.style.top = (window.innerHeight - text.clientHeight)
|
||||||
|
+ 'px';
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
CSS = """
|
CSS = """
|
||||||
|
Loading…
Reference in New Issue
Block a user