forked from openlp/openlp
fixed default screen values
This commit is contained in:
parent
7e444aa15c
commit
423edf5905
@ -246,13 +246,31 @@ class ScreenList(object):
|
|||||||
from openlp.core.lib import Settings
|
from openlp.core.lib import Settings
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
settings.beginGroup(u'general')
|
settings.beginGroup(u'general')
|
||||||
self.set_current_display(settings.value(u'monitor'))
|
monitor = settings.value(u'monitor')
|
||||||
|
# If -1 has been returned we have to use default values.
|
||||||
|
if monitor == -1:
|
||||||
|
monitor = self.display_count - 1
|
||||||
|
settings.setValue(u'monitor', monitor)
|
||||||
|
self.set_current_display(monitor)
|
||||||
self.display = settings.value(u'display on monitor')
|
self.display = settings.value(u'display on monitor')
|
||||||
override_display = settings.value(u'override position')
|
override_display = settings.value(u'override position')
|
||||||
x = settings.value(u'x position')
|
x = settings.value(u'x position')
|
||||||
y = settings.value(u'y position')
|
y = settings.value(u'y position')
|
||||||
width = settings.value(u'width')
|
width = settings.value(u'width')
|
||||||
height = settings.value(u'height')
|
height = settings.value(u'height')
|
||||||
|
# If -1 has been returned we have to use default values.
|
||||||
|
if x == -1:
|
||||||
|
x = self.current[u'size'].x()
|
||||||
|
settings.setValue(u'x position', x)
|
||||||
|
if y == -1:
|
||||||
|
self.current[u'size'].y()
|
||||||
|
settings.setValue(u'y position', y)
|
||||||
|
if width == -1:
|
||||||
|
width = self.current[u'size'].width()
|
||||||
|
settings.setValue(u'width', width)
|
||||||
|
if height == -1:
|
||||||
|
height = self.current[u'size'].height()
|
||||||
|
settings.setValue(u'height', height)
|
||||||
self.override[u'size'] = QtCore.QRect(x, y, width, height)
|
self.override[u'size'] = QtCore.QRect(x, y, width, height)
|
||||||
self.override[u'primary'] = False
|
self.override[u'primary'] = False
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
@ -36,7 +36,7 @@ import sys
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import SlideLimits, ScreenList
|
from openlp.core.lib import SlideLimits
|
||||||
from openlp.core.lib.theme import ThemeLevel
|
from openlp.core.lib.theme import ThemeLevel
|
||||||
from openlp.core.lib import UiStrings
|
from openlp.core.lib import UiStrings
|
||||||
|
|
||||||
@ -107,17 +107,18 @@ class Settings(QtCore.QSettings):
|
|||||||
u'general/recent files': [],
|
u'general/recent files': [],
|
||||||
u'general/save prompt': False,
|
u'general/save prompt': False,
|
||||||
u'general/auto preview': False,
|
u'general/auto preview': False,
|
||||||
u'general/override position': False,
|
|
||||||
u'general/view mode': u'default',
|
u'general/view mode': u'default',
|
||||||
u'general/auto open': False,
|
u'general/auto open': False,
|
||||||
u'general/enable slide loop': True,
|
u'general/enable slide loop': True,
|
||||||
u'general/show splash': True,
|
u'general/show splash': True,
|
||||||
u'general/screen blank': False,
|
u'general/screen blank': False,
|
||||||
u'general/x position': 0, #ScreenList().current[u'size'].x()
|
u'general/override position': False,
|
||||||
u'general/y position': 0, # ScreenList().current[u'size'].y()
|
# Display defaults are set in core/lib/screen.py due to a circle dependency.
|
||||||
u'general/monitor': 0, # ScreenList().display_count - 1
|
u'general/x position': -1,
|
||||||
u'general/height': 1024, # ScreenList().current[u'size'].height()
|
u'general/y position': -1,
|
||||||
u'general/width': 1280, # ScreenList().current[u'size'].width()
|
u'general/monitor': -1,
|
||||||
|
u'general/height': -1,
|
||||||
|
u'general/width': -1,
|
||||||
u'general/loop delay': 5,
|
u'general/loop delay': 5,
|
||||||
u'general/songselect username': u'',
|
u'general/songselect username': u'',
|
||||||
u'general/audio repeat list': False,
|
u'general/audio repeat list': False,
|
||||||
|
Loading…
Reference in New Issue
Block a user