forked from openlp/openlp
Theme blanking works now
This commit is contained in:
parent
003d0552eb
commit
ab37fdbcf8
@ -77,7 +77,7 @@ class DisplayWidget(QtGui.QGraphicsView):
|
|||||||
Receiver.send_message(self.hotkey_map[event.key()])
|
Receiver.send_message(self.hotkey_map[event.key()])
|
||||||
event.accept()
|
event.accept()
|
||||||
elif event.key() == QtCore.Qt.Key_Escape:
|
elif event.key() == QtCore.Qt.Key_Escape:
|
||||||
self.resetDisplay()
|
self.setVisible(False)
|
||||||
event.accept()
|
event.accept()
|
||||||
event.ignore()
|
event.ignore()
|
||||||
else:
|
else:
|
||||||
@ -99,12 +99,6 @@ class MainDisplay(DisplayWidget):
|
|||||||
QtCore.SIGNAL(u'maindisplay_hide'), self.hideDisplay)
|
QtCore.SIGNAL(u'maindisplay_hide'), self.hideDisplay)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
|
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
|
||||||
## QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
## QtCore.SIGNAL(u'videodisplay_start'), self.onStartVideo)
|
|
||||||
## QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
## QtCore.SIGNAL(u'videodisplay_stop'), self.onStopVideo)
|
|
||||||
## QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
## QtCore.SIGNAL(u'config_updated'), self.setup)
|
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
log.debug(u'Setup %s for %s ' % (
|
log.debug(u'Setup %s for %s ' % (
|
||||||
@ -147,6 +141,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
serviceItem = ServiceItem()
|
serviceItem = ServiceItem()
|
||||||
serviceItem.bg_frame = initialFrame
|
serviceItem.bg_frame = initialFrame
|
||||||
self.webView.setHtml(build_html(serviceItem, self.screen, self.parent.alertTab))
|
self.webView.setHtml(build_html(serviceItem, self.screen, self.parent.alertTab))
|
||||||
|
self.initialFrame = True
|
||||||
self.show()
|
self.show()
|
||||||
# To display or not to display?
|
# To display or not to display?
|
||||||
if not self.screen[u'primary']:
|
if not self.screen[u'primary']:
|
||||||
@ -294,6 +289,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'buildHtml')
|
log.debug(u'buildHtml')
|
||||||
self.loaded = False
|
self.loaded = False
|
||||||
|
self.initialFrame = False
|
||||||
self.serviceItem = serviceItem
|
self.serviceItem = serviceItem
|
||||||
html = build_html(self.serviceItem, self.screen, self.parent.alertTab)
|
html = build_html(self.serviceItem, self.screen, self.parent.alertTab)
|
||||||
self.webView.setHtml(html)
|
self.webView.setHtml(html)
|
||||||
@ -310,13 +306,9 @@ class MainDisplay(DisplayWidget):
|
|||||||
"document.getElementById('blank').style.visibility = 'visible'")
|
"document.getElementById('blank').style.visibility = 'visible'")
|
||||||
if mode == HideMode.Screen:
|
if mode == HideMode.Screen:
|
||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
elif mode == HideMode.Blank:
|
elif mode == HideMode.Blank or self.initialFrame:
|
||||||
self.frame.evaluateJavaScript('blankState("black");')
|
self.frame.evaluateJavaScript('blankState("black");')
|
||||||
else:
|
else:
|
||||||
#if self.serviceItem:
|
|
||||||
# self.displayBlank.setPixmap(QtGui.QPixmap.fromImage(
|
|
||||||
# self.parent.renderManager.renderer.bg_frame))
|
|
||||||
#else:
|
|
||||||
self.frame.evaluateJavaScript('blankState("theme");')
|
self.frame.evaluateJavaScript('blankState("theme");')
|
||||||
if mode != HideMode.Screen and self.isHidden():
|
if mode != HideMode.Screen and self.isHidden():
|
||||||
self.setVisible(True)
|
self.setVisible(True)
|
||||||
|
Loading…
Reference in New Issue
Block a user