forked from openlp/openlp
Fixed incorrect showing of image based on splash screen configuration.
Fixed a bug where the display screen's image would not resize when the display screen was set to another desktop.
This commit is contained in:
parent
4e9aa7f142
commit
08786fdcec
@ -137,6 +137,7 @@ class MainDisplay(DisplayLabel):
|
|||||||
@param (integer) screen This is the screen number.
|
@param (integer) screen This is the screen number.
|
||||||
"""
|
"""
|
||||||
log.debug(u'Setup %s for %s ' %(self.screens, screenNumber))
|
log.debug(u'Setup %s for %s ' %(self.screens, screenNumber))
|
||||||
|
self.setVisible(False)
|
||||||
screen = self.screens[screenNumber]
|
screen = self.screens[screenNumber]
|
||||||
if screen[u'number'] != screenNumber:
|
if screen[u'number'] != screenNumber:
|
||||||
# We will most probably never actually hit this bit, but just in
|
# We will most probably never actually hit this bit, but just in
|
||||||
@ -154,7 +155,6 @@ class MainDisplay(DisplayLabel):
|
|||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
self.primary = True
|
self.primary = True
|
||||||
#Build a custom splash screen
|
#Build a custom splash screen
|
||||||
if str_to_bool(self.parent.generalConfig.get_config(u'show splash', u'True')):
|
|
||||||
self.InitialFrame = QtGui.QImage(
|
self.InitialFrame = QtGui.QImage(
|
||||||
screen[u'size'].width(), screen[u'size'].height(),
|
screen[u'size'].width(), screen[u'size'].height(),
|
||||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||||
|
@ -544,7 +544,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
monitor number does not exist.
|
monitor number does not exist.
|
||||||
"""
|
"""
|
||||||
screen_number = int(self.generalConfig.get_config(u'Monitor', 0))
|
screen_number = int(self.generalConfig.get_config(u'Monitor', 0))
|
||||||
|
|
||||||
monitor_exists = False
|
monitor_exists = False
|
||||||
for screen in self.screenList:
|
for screen in self.screenList:
|
||||||
if screen[u'number'] == screen_number:
|
if screen[u'number'] == screen_number:
|
||||||
@ -560,7 +559,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.showMaximized()
|
self.showMaximized()
|
||||||
screen_number = self.getMonitorNumber()
|
screen_number = self.getMonitorNumber()
|
||||||
self.mainDisplay.setup(screen_number)
|
self.mainDisplay.setup(screen_number)
|
||||||
self.setFocus()
|
if self.mainDisplay.isVisible():
|
||||||
|
self.mainDisplay.setFocus()
|
||||||
|
self.activateWindow()
|
||||||
if str_to_bool(self.generalConfig.get_config(u'Auto Open', False)):
|
if str_to_bool(self.generalConfig.get_config(u'Auto Open', False)):
|
||||||
self.ServiceManagerContents.onLoadService(True)
|
self.ServiceManagerContents.onLoadService(True)
|
||||||
if str_to_bool(self.generalConfig.get_config(u'Screen Blank', False)) \
|
if str_to_bool(self.generalConfig.get_config(u'Screen Blank', False)) \
|
||||||
@ -601,6 +602,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
if updated_display != self.RenderManager.current_display:
|
if updated_display != self.RenderManager.current_display:
|
||||||
self.RenderManager.update_display(updated_display)
|
self.RenderManager.update_display(updated_display)
|
||||||
self.mainDisplay.setup(updated_display)
|
self.mainDisplay.setup(updated_display)
|
||||||
|
self.activateWindow()
|
||||||
|
|
||||||
def closeEvent(self, event):
|
def closeEvent(self, event):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user