Display is now big enough

This commit is contained in:
Tim Bentley 2011-10-02 17:38:05 +01:00
parent 297a250010
commit 6426d9aac4
3 changed files with 7 additions and 6 deletions

View File

@ -246,6 +246,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
self.resizeEvent()
def onCustom1ButtonClicked(self, number):
"""
Generate layout preview and display the form
"""
width = self.thememanager.mainwindow.renderer.width
height = self.thememanager.mainwindow.renderer.height
pixmap = QtGui.QPixmap(width, height)
@ -260,7 +263,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
paint.end()
self.themeLayoutForm.exec_(pixmap)
def onOutlineCheckCheckBoxStateChanged(self, state):
"""
Change state as Outline check box changed
@ -294,7 +296,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
"""
if self.updateThemeAllowed:
self.theme.font_main_override = not (value == QtCore.Qt.Checked)
self._generate_layout()
def onFooterPositionCheckBoxStateChanged(self, value):
"""
@ -303,7 +304,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
"""
if self.updateThemeAllowed:
self.theme.font_footer_override = not (value == QtCore.Qt.Checked)
self._generate_layout()
def exec_(self, edit=False):
"""

View File

@ -34,7 +34,7 @@ from openlp.core.lib.ui import create_accept_reject_button_box
class Ui_ThemeLayoutDialog(object):
def setupUi(self, themeLayoutDialog):
themeLayoutDialog.setObjectName(u'themeLayoutDialogDialog')
themeLayoutDialog.resize(300, 200)
#themeLayoutDialog.resize(300, 200)
self.previewLayout = QtGui.QVBoxLayout(themeLayoutDialog)
self.previewLayout.setObjectName(u'PreviewLayout')
self.previewArea = QtGui.QWidget(themeLayoutDialog)

View File

@ -44,11 +44,12 @@ class ThemeLayoutForm(QtGui.QDialog, Ui_ThemeLayoutDialog):
"""
Run the Dialog with correct heading.
"""
pixmap = image.scaledToHeight(150, QtCore.Qt.SmoothTransformation)
pixmap = image.scaledToHeight(400, QtCore.Qt.SmoothTransformation)
self.themeDisplayLabel.setPixmap(image)
displayAspectRatio = float(image.width()) / image.height()
self.themeDisplayLabel.setFixedSize(400, 400 / displayAspectRatio )
return QtGui.QDialog.exec_(self)
def accept(self):
return QtGui.QDialog.accept(self)