openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #12608
[Merge] lp:~googol/openlp/alerts into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/alerts into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol/openlp/alerts/+merge/80764
Hello,
The alert position is now being recalculated properly when the alerts options are changed.
--
https://code.launchpad.net/~googol/openlp/alerts/+merge/80764
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/alerts into lp:openlp.
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2011-10-17 18:01:07 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2011-10-30 20:51:25 +0000
@@ -71,11 +71,24 @@
function update_css(align, font, size, color, bgcolor){
var text = document.getElementById('alert');
- text.style.verticalAlign = align;
text.style.fontSize = size + "pt";
text.style.fontFamily = font;
text.style.color = color;
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 = """
Follow ups