forked from openlp/openlp
Show Splash screen option now works
This commit is contained in:
parent
7ae0e045d3
commit
1082428926
@ -25,7 +25,7 @@
|
||||
import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Receiver
|
||||
from openlp.core.lib import Receiver, str_to_bool
|
||||
|
||||
class MainDisplay(QtGui.QWidget):
|
||||
"""
|
||||
@ -87,18 +87,19 @@ class MainDisplay(QtGui.QWidget):
|
||||
else:
|
||||
self.showMinimized()
|
||||
#Build a custom splash screen
|
||||
self.InitialFrame = QtGui.QImage(
|
||||
screen[u'size'].width(), screen[u'size'].height(),
|
||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
splash_image = QtGui.QImage(u':/graphics/openlp-splash-screen.png')
|
||||
painter_image = QtGui.QPainter()
|
||||
painter_image.begin(self.InitialFrame)
|
||||
painter_image.fillRect(self.InitialFrame.rect(), QtCore.Qt.white)
|
||||
painter_image.drawImage(
|
||||
(screen[u'size'].width() - splash_image.width()) / 2,
|
||||
(screen[u'size'].height() - splash_image.height()) / 2,
|
||||
splash_image)
|
||||
self.frameView(self.InitialFrame)
|
||||
if str_to_bool(self.parent.generalConfig.get_config(u'show splash', u'True')):
|
||||
self.InitialFrame = QtGui.QImage(
|
||||
screen[u'size'].width(), screen[u'size'].height(),
|
||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
splash_image = QtGui.QImage(u':/graphics/openlp-splash-screen.png')
|
||||
painter_image = QtGui.QPainter()
|
||||
painter_image.begin(self.InitialFrame)
|
||||
painter_image.fillRect(self.InitialFrame.rect(), QtCore.Qt.white)
|
||||
painter_image.drawImage(
|
||||
(screen[u'size'].width() - splash_image.width()) / 2,
|
||||
(screen[u'size'].height() - splash_image.height()) / 2,
|
||||
splash_image)
|
||||
self.frameView(self.InitialFrame)
|
||||
#Build a Black screen
|
||||
painter = QtGui.QPainter()
|
||||
self.blankFrame = QtGui.QImage(
|
||||
|
@ -418,8 +418,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.screenList = screens
|
||||
self.serviceNotSaved = False
|
||||
self.settingsmanager = SettingsManager(screens)
|
||||
self.mainDisplay = MainDisplay(self, screens)
|
||||
self.generalConfig = PluginConfig(u'General')
|
||||
self.mainDisplay = MainDisplay(self, screens)
|
||||
self.alertForm = AlertForm(self)
|
||||
self.aboutForm = AboutForm(self)
|
||||
self.settingsForm = SettingsForm(self.screenList, self)
|
||||
|
Loading…
Reference in New Issue
Block a user