forked from openlp/openlp
Display is now big enough
This commit is contained in:
parent
297a250010
commit
6426d9aac4
@ -246,6 +246,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
self.resizeEvent()
|
self.resizeEvent()
|
||||||
|
|
||||||
def onCustom1ButtonClicked(self, number):
|
def onCustom1ButtonClicked(self, number):
|
||||||
|
"""
|
||||||
|
Generate layout preview and display the form
|
||||||
|
"""
|
||||||
width = self.thememanager.mainwindow.renderer.width
|
width = self.thememanager.mainwindow.renderer.width
|
||||||
height = self.thememanager.mainwindow.renderer.height
|
height = self.thememanager.mainwindow.renderer.height
|
||||||
pixmap = QtGui.QPixmap(width, height)
|
pixmap = QtGui.QPixmap(width, height)
|
||||||
@ -260,7 +263,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
paint.end()
|
paint.end()
|
||||||
self.themeLayoutForm.exec_(pixmap)
|
self.themeLayoutForm.exec_(pixmap)
|
||||||
|
|
||||||
|
|
||||||
def onOutlineCheckCheckBoxStateChanged(self, state):
|
def onOutlineCheckCheckBoxStateChanged(self, state):
|
||||||
"""
|
"""
|
||||||
Change state as Outline check box changed
|
Change state as Outline check box changed
|
||||||
@ -294,7 +296,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
"""
|
"""
|
||||||
if self.updateThemeAllowed:
|
if self.updateThemeAllowed:
|
||||||
self.theme.font_main_override = not (value == QtCore.Qt.Checked)
|
self.theme.font_main_override = not (value == QtCore.Qt.Checked)
|
||||||
self._generate_layout()
|
|
||||||
|
|
||||||
def onFooterPositionCheckBoxStateChanged(self, value):
|
def onFooterPositionCheckBoxStateChanged(self, value):
|
||||||
"""
|
"""
|
||||||
@ -303,7 +304,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
"""
|
"""
|
||||||
if self.updateThemeAllowed:
|
if self.updateThemeAllowed:
|
||||||
self.theme.font_footer_override = not (value == QtCore.Qt.Checked)
|
self.theme.font_footer_override = not (value == QtCore.Qt.Checked)
|
||||||
self._generate_layout()
|
|
||||||
|
|
||||||
def exec_(self, edit=False):
|
def exec_(self, edit=False):
|
||||||
"""
|
"""
|
||||||
|
@ -34,7 +34,7 @@ from openlp.core.lib.ui import create_accept_reject_button_box
|
|||||||
class Ui_ThemeLayoutDialog(object):
|
class Ui_ThemeLayoutDialog(object):
|
||||||
def setupUi(self, themeLayoutDialog):
|
def setupUi(self, themeLayoutDialog):
|
||||||
themeLayoutDialog.setObjectName(u'themeLayoutDialogDialog')
|
themeLayoutDialog.setObjectName(u'themeLayoutDialogDialog')
|
||||||
themeLayoutDialog.resize(300, 200)
|
#themeLayoutDialog.resize(300, 200)
|
||||||
self.previewLayout = QtGui.QVBoxLayout(themeLayoutDialog)
|
self.previewLayout = QtGui.QVBoxLayout(themeLayoutDialog)
|
||||||
self.previewLayout.setObjectName(u'PreviewLayout')
|
self.previewLayout.setObjectName(u'PreviewLayout')
|
||||||
self.previewArea = QtGui.QWidget(themeLayoutDialog)
|
self.previewArea = QtGui.QWidget(themeLayoutDialog)
|
||||||
|
@ -44,11 +44,12 @@ class ThemeLayoutForm(QtGui.QDialog, Ui_ThemeLayoutDialog):
|
|||||||
"""
|
"""
|
||||||
Run the Dialog with correct heading.
|
Run the Dialog with correct heading.
|
||||||
"""
|
"""
|
||||||
pixmap = image.scaledToHeight(150, QtCore.Qt.SmoothTransformation)
|
pixmap = image.scaledToHeight(400, QtCore.Qt.SmoothTransformation)
|
||||||
self.themeDisplayLabel.setPixmap(image)
|
self.themeDisplayLabel.setPixmap(image)
|
||||||
|
displayAspectRatio = float(image.width()) / image.height()
|
||||||
|
self.themeDisplayLabel.setFixedSize(400, 400 / displayAspectRatio )
|
||||||
return QtGui.QDialog.exec_(self)
|
return QtGui.QDialog.exec_(self)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
return QtGui.QDialog.accept(self)
|
return QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user