Part of corrections to display sizes

bzr-revno: 1166
Fixes: https://launchpad.net/bugs/598356
This commit is contained in:
andreas 2010-12-26 10:19:39 +00:00 committed by Tim Bentley
commit 8dc93ad67d
1 changed files with 22 additions and 1 deletions

View File

@ -312,6 +312,18 @@ class GeneralTab(SettingsTab):
# Signals and slots
QtCore.QObject.connect(self.overrideCheckBox,
QtCore.SIGNAL(u'toggled(bool)'), self.onOverrideCheckBoxToggled)
QtCore.QObject.connect(self.customHeightValueEdit,
QtCore.SIGNAL(u'textEdited(const QString&)'),
self.onDisplayPositionChanged)
QtCore.QObject.connect(self.customWidthValueEdit,
QtCore.SIGNAL(u'textEdited(const QString&)'),
self.onDisplayPositionChanged)
QtCore.QObject.connect(self.customYValueEdit,
QtCore.SIGNAL(u'textEdited(const QString&)'),
self.onDisplayPositionChanged)
QtCore.QObject.connect(self.customXValueEdit,
QtCore.SIGNAL(u'textEdited(const QString&)'),
self.onDisplayPositionChanged)
def retranslateUi(self):
"""
@ -503,10 +515,19 @@ class GeneralTab(SettingsTab):
def onOverrideCheckBoxToggled(self, checked):
"""
Toggle screen state depending on check box state
Toggle screen state depending on check box state.
``checked``
The state of the check box (boolean).
"""
self.customXValueEdit.setEnabled(checked)
self.customYValueEdit.setEnabled(checked)
self.customHeightValueEdit.setEnabled(checked)
self.customWidthValueEdit.setEnabled(checked)
self.overrideChanged = True
def onDisplayPositionChanged(self):
"""
Called when the width, height, x position or y position has changed.
"""
self.overrideChanged = True