forked from openlp/openlp
Fix bugs regarding screen blanking
bzr-revno: 1015 Fixes: https://launchpad.net/bugs/639285, https://launchpad.net/bugs/630254
This commit is contained in:
commit
991d8f1caf
@ -145,6 +145,7 @@ body {
|
||||
}
|
||||
document.getElementById('black').style.display = black;
|
||||
document.getElementById('lyricsmain').style.visibility = lyrics;
|
||||
document.getElementById('image').style.visibility = lyrics;
|
||||
outline = document.getElementById('lyricsoutline')
|
||||
if(outline!=null)
|
||||
outline.style.visibility = lyrics;
|
||||
@ -370,7 +371,7 @@ def build_lyrics_css(item, webkitvers):
|
||||
lyricsmain = u''
|
||||
outline = u''
|
||||
shadow = u''
|
||||
if theme:
|
||||
if theme and item.main:
|
||||
lyricstable = u'left: %spx; top: %spx;' % \
|
||||
(item.main.x(), item.main.y())
|
||||
lyrics = build_lyrics_format_css(theme, item.main.width(),
|
||||
@ -520,7 +521,7 @@ def build_footer_css(item):
|
||||
text-align: %s;
|
||||
"""
|
||||
theme = item.themedata
|
||||
if not theme:
|
||||
if not theme or not item.footer:
|
||||
return u''
|
||||
if theme.display_horizontalAlign == 2:
|
||||
align = u'center'
|
||||
|
@ -93,6 +93,8 @@ class RenderManager(object):
|
||||
"""
|
||||
self.global_theme = global_theme
|
||||
self.theme_level = theme_level
|
||||
self.global_theme_data = \
|
||||
self.theme_manager.getThemeData(self.global_theme)
|
||||
self.themedata = None
|
||||
|
||||
def set_service_theme(self, service_theme):
|
||||
|
@ -170,6 +170,7 @@ class ServiceItem(object):
|
||||
u'verseTag': slide[u'verseTag'] })
|
||||
log.log(15, u'Formatting took %4s' % (time.time() - before))
|
||||
elif self.service_item_type == ServiceItemType.Image:
|
||||
self.themedata = self.render_manager.global_theme_data
|
||||
for slide in self._raw_frames:
|
||||
slide[u'image'] = resize_image(slide[u'image'],
|
||||
self.render_manager.width, self.render_manager.height)
|
||||
|
@ -97,6 +97,7 @@ class MainDisplay(DisplayWidget):
|
||||
self.screens = screens
|
||||
self.isLive = live
|
||||
self.alertTab = None
|
||||
self.hide_mode = None
|
||||
self.setWindowTitle(u'OpenLP Display')
|
||||
self.setWindowFlags(QtCore.Qt.FramelessWindowHint |
|
||||
QtCore.Qt.WindowStaysOnTopHint)
|
||||
@ -340,6 +341,9 @@ class MainDisplay(DisplayWidget):
|
||||
self.webView.setHtml(html)
|
||||
if serviceItem.foot_text and serviceItem.foot_text:
|
||||
self.footer(serviceItem.foot_text)
|
||||
# if was hidden keep it hidden
|
||||
if self.hide_mode and self.isLive:
|
||||
self.hideDisplay(self.hide_mode)
|
||||
|
||||
def footer(self, text):
|
||||
"""
|
||||
@ -365,6 +369,7 @@ class MainDisplay(DisplayWidget):
|
||||
self.frame.evaluateJavaScript(u'show_blank("theme");')
|
||||
if mode != HideMode.Screen and self.isHidden():
|
||||
self.setVisible(True)
|
||||
self.hide_mode = mode
|
||||
|
||||
def showDisplay(self):
|
||||
"""
|
||||
@ -378,6 +383,7 @@ class MainDisplay(DisplayWidget):
|
||||
self.setVisible(True)
|
||||
# Trigger actions when display is active again
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
self.hide_mode = None
|
||||
|
||||
class AudioPlayer(QtCore.QObject):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user