From 3e2e87bb2c6686753486294f9fb6650a8d921234 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 27 Sep 2011 20:37:34 +0100 Subject: [PATCH 01/14] Initial stab Fixes: https://launchpad.net/bugs/814201 --- openlp/core/ui/themeform.py | 34 ++++++++++++++++++++++++++++++++++ openlp/core/ui/themewizard.py | 15 +++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index dc3c23d0d..5de7a239e 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -229,6 +229,8 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): """ Detects Page changes and updates as approprate. """ + if self.page(pageId) == self.areaPositionPage: + self._generate_layout() if self.page(pageId) == self.previewPage: self.updateTheme() frame = self.thememanager.generateImage(self.theme) @@ -236,6 +238,38 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.displayAspectRatio = float(frame.width()) / frame.height() self.resizeEvent() + def _generate_layout(self): + width = self.thememanager.mainwindow.renderer.width + height = self.thememanager.mainwindow.renderer.height + footer_start = int(height * 0.90) + pixmap = QtGui.QPixmap(width, height) + pixmap.fill(QtCore.Qt.white) + paint = QtGui.QPainter(pixmap) + paint.setPen(QtCore.Qt.blue) + if not self.theme.font_main_override: + main_rect = QtCore.QRect(10, 0, width - 20, footer_start) + else: + main_rect = QtCore.QRect(self.theme.font_main_x, self.theme.font_main_y, + self.theme.font_main_width - 1, self.theme.font_main_height - 1) + paint.drawRect(main_rect) + paint.setPen(QtCore.Qt.red) + if not self.theme.font_footer_override: + footer_rect = QtCore.QRect(10, footer_start, width - 20, + height - footer_start) + else: + footer_rect = QtCore.QRect(self.theme.font_footer_x, + self.theme.font_footer_y, self.theme.font_footer_width - 1, + self.theme.font_footer_height - 1) + print footer_rect + paint.drawRect(footer_rect) + paint.end() + pixmap = pixmap.scaled(100, 100 * + self.thememanager.mainwindow.renderer.screen_ratio, + QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) + self.themeLayoutLabel.setPixmap(pixmap) + self.displayAspectRatio = float(pixmap.width()) / pixmap.height() + self.resizeEvent() + def onOutlineCheckCheckBoxStateChanged(self, state): """ Change state as Outline check box changed diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py index c7cba0ebd..12ae97d0d 100644 --- a/openlp/core/ui/themewizard.py +++ b/openlp/core/ui/themewizard.py @@ -336,6 +336,21 @@ class Ui_ThemeWizard(object): self.footerPositionLayout.addRow(self.footerHeightLabel, self.footerHeightSpinBox) self.areaPositionLayout.addWidget(self.footerPositionGroupBox) + self.layoutArea = QtGui.QWidget(self.areaPositionPage) + self.layoutArea.setObjectName(u'LayoutArea') + self.themeLayoutPreview = QtGui.QGridLayout(self.layoutArea) + self.themeLayoutPreview.setMargin(0) + self.themeLayoutPreview.setColumnStretch(0, 1) + self.themeLayoutPreview.setRowStretch(0, 1) + self.themeLayoutLabel = QtGui.QLabel(self.areaPositionPage) + self.themeLayoutLabel.setObjectName(u'ThemeLayoutPreview') + self.themeLayoutLabel.setObjectName(u'ThemeLayoutPreview') + self.themeLayoutLabel = QtGui.QLabel(self.layoutArea) + self.themeLayoutLabel.setFrameShape(QtGui.QFrame.Box) + self.themeLayoutLabel.setScaledContents(True) + self.themeLayoutLabel.setObjectName(u'ThemeLayoutLabel') + self.areaPositionLayout.addWidget(self.themeLayoutLabel) + self.areaPositionLayout.addWidget(self.layoutArea) themeWizard.addPage(self.areaPositionPage) # Preview Page self.previewPage = QtGui.QWizardPage() From 632e2ce2dd1acf21838450040365ec10158d49d0 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 28 Sep 2011 05:50:56 +0100 Subject: [PATCH 02/14] More fixes --- openlp/core/ui/themeform.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 5de7a239e..63dc542fa 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -245,14 +245,14 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): pixmap = QtGui.QPixmap(width, height) pixmap.fill(QtCore.Qt.white) paint = QtGui.QPainter(pixmap) - paint.setPen(QtCore.Qt.blue) + paint.setPen(QtGui.QPen(QtCore.Qt.blue)) if not self.theme.font_main_override: main_rect = QtCore.QRect(10, 0, width - 20, footer_start) else: main_rect = QtCore.QRect(self.theme.font_main_x, self.theme.font_main_y, self.theme.font_main_width - 1, self.theme.font_main_height - 1) paint.drawRect(main_rect) - paint.setPen(QtCore.Qt.red) + paint.setPen(QtGui.QPen(QtCore.Qt.red)) if not self.theme.font_footer_override: footer_rect = QtCore.QRect(10, footer_start, width - 20, height - footer_start) @@ -260,12 +260,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): footer_rect = QtCore.QRect(self.theme.font_footer_x, self.theme.font_footer_y, self.theme.font_footer_width - 1, self.theme.font_footer_height - 1) - print footer_rect paint.drawRect(footer_rect) paint.end() - pixmap = pixmap.scaled(100, 100 * - self.thememanager.mainwindow.renderer.screen_ratio, - QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) + pixmap = pixmap.scaledToWidth(100, QtCore.Qt.SmoothTransformation) self.themeLayoutLabel.setPixmap(pixmap) self.displayAspectRatio = float(pixmap.width()) / pixmap.height() self.resizeEvent() @@ -303,6 +300,7 @@ 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): """ @@ -311,6 +309,7 @@ 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): """ From ff32139b2e278791753868255efa941713f4e0aa Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 28 Sep 2011 18:39:26 +0100 Subject: [PATCH 03/14] refactor code to stop duplicate code --- openlp/core/lib/renderer.py | 28 +++++++++++++++++++----- openlp/core/ui/themeform.py | 18 +++------------ openlp/plugins/remotes/lib/httpserver.py | 2 +- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 6d48707b4..dce5b38ee 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -306,19 +306,37 @@ class Renderer(object): log.debug(u'_build_text_rectangle') main_rect = None footer_rect = None + main_rect = self.get_main_rectangle(theme) + footer_rect = self.get_main_rectangle(theme) + self._set_text_rectangle(main_rect, footer_rect) + + def get_main_rectangle(self, theme): + """ + Calculates the placement and size of the main rectangle + + ``theme`` + The theme information + """ if not theme.font_main_override: - main_rect = QtCore.QRect(10, 0, self.width - 20, self.footer_start) + return QtCore.QRect(10, 0, self.width - 20, self.footer_start) else: - main_rect = QtCore.QRect(theme.font_main_x, theme.font_main_y, + return QtCore.QRect(theme.font_main_x, theme.font_main_y, theme.font_main_width - 1, theme.font_main_height - 1) + + def get_footer_rectangle(self, theme): + """ + Calculates the placement and size of the main rectangle + + ``theme`` + The theme information + """ if not theme.font_footer_override: - footer_rect = QtCore.QRect(10, self.footer_start, self.width - 20, + return QtCore.QRect(10, self.footer_start, self.width - 20, self.height - self.footer_start) else: - footer_rect = QtCore.QRect(theme.font_footer_x, + return QtCore.QRect(theme.font_footer_x, theme.font_footer_y, theme.font_footer_width - 1, theme.font_footer_height - 1) - self._set_text_rectangle(main_rect, footer_rect) def _set_text_rectangle(self, rect_main, rect_footer): """ diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 63dc542fa..0d4aeff32 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -246,23 +246,11 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): pixmap.fill(QtCore.Qt.white) paint = QtGui.QPainter(pixmap) paint.setPen(QtGui.QPen(QtCore.Qt.blue)) - if not self.theme.font_main_override: - main_rect = QtCore.QRect(10, 0, width - 20, footer_start) - else: - main_rect = QtCore.QRect(self.theme.font_main_x, self.theme.font_main_y, - self.theme.font_main_width - 1, self.theme.font_main_height - 1) - paint.drawRect(main_rect) + paint.drawRect(self.thememanager.mainwindow.renderer.get_main_rectangle(self.theme)) paint.setPen(QtGui.QPen(QtCore.Qt.red)) - if not self.theme.font_footer_override: - footer_rect = QtCore.QRect(10, footer_start, width - 20, - height - footer_start) - else: - footer_rect = QtCore.QRect(self.theme.font_footer_x, - self.theme.font_footer_y, self.theme.font_footer_width - 1, - self.theme.font_footer_height - 1) - paint.drawRect(footer_rect) + paint.drawRect(self.thememanager.mainwindow.renderer.get_footer_rectangle(self.theme)) paint.end() - pixmap = pixmap.scaledToWidth(100, QtCore.Qt.SmoothTransformation) + pixmap = pixmap.scaledToWidth(200, QtCore.Qt.SmoothTransformation) self.themeLayoutLabel.setPixmap(pixmap) self.displayAspectRatio = float(pixmap.width()) / pixmap.height() self.resizeEvent() diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index c81c83d92..a01691284 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -315,7 +315,7 @@ class HttpConnection(object): """ log.debug(u'ready to read socket') if self.socket.canReadLine(): - data = unicode(self.socket.readLine()) + data = unicode(self.socket.readLine()).encode(u'utf-8') log.debug(u'received: ' + data) words = data.split(u' ') response = None From 9142ffb4881d8743691523c19e33dd02593b01bd Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 28 Sep 2011 21:43:30 +0100 Subject: [PATCH 04/14] more visible lines --- openlp/core/lib/renderer.py | 2 -- openlp/core/ui/themeform.py | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index dce5b38ee..3d0d1e080 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -304,8 +304,6 @@ class Renderer(object): The theme to build a text block for. """ log.debug(u'_build_text_rectangle') - main_rect = None - footer_rect = None main_rect = self.get_main_rectangle(theme) footer_rect = self.get_main_rectangle(theme) self._set_text_rectangle(main_rect, footer_rect) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 0d4aeff32..114d541f5 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -241,13 +241,12 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): def _generate_layout(self): width = self.thememanager.mainwindow.renderer.width height = self.thememanager.mainwindow.renderer.height - footer_start = int(height * 0.90) pixmap = QtGui.QPixmap(width, height) pixmap.fill(QtCore.Qt.white) paint = QtGui.QPainter(pixmap) - paint.setPen(QtGui.QPen(QtCore.Qt.blue)) + paint.setPen(QtGui.QPen(QtCore.Qt.blue, 2)) paint.drawRect(self.thememanager.mainwindow.renderer.get_main_rectangle(self.theme)) - paint.setPen(QtGui.QPen(QtCore.Qt.red)) + paint.setPen(QtGui.QPen(QtCore.Qt.red, 2)) paint.drawRect(self.thememanager.mainwindow.renderer.get_footer_rectangle(self.theme)) paint.end() pixmap = pixmap.scaledToWidth(200, QtCore.Qt.SmoothTransformation) From 128b6b80bf9139e276795270a0bea3a0ec4e63c7 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Thu, 29 Sep 2011 18:57:48 +0100 Subject: [PATCH 05/14] Display now works --- openlp/core/ui/themeform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 114d541f5..743b0ca2d 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -249,7 +249,8 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): paint.setPen(QtGui.QPen(QtCore.Qt.red, 2)) paint.drawRect(self.thememanager.mainwindow.renderer.get_footer_rectangle(self.theme)) paint.end() - pixmap = pixmap.scaledToWidth(200, QtCore.Qt.SmoothTransformation) + pixmap = pixmap.scaledToHeight(150, QtCore.Qt.SmoothTransformation) + self.themeLayoutLabel.setFixedSize(pixmap.width() + 2, pixmap.height() + 2) self.themeLayoutLabel.setPixmap(pixmap) self.displayAspectRatio = float(pixmap.width()) / pixmap.height() self.resizeEvent() From 648c5159a190e235be90109dd0311448ad168788 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 1 Oct 2011 17:34:09 +0530 Subject: [PATCH 06/14] Allow the stageview time to be formatted between 12 and 24 hours Fixes: https://launchpad.net/bugs/863841 --- openlp/plugins/remotes/html/stage.js | 6 +++--- openlp/plugins/remotes/lib/httpserver.py | 4 +++- openlp/plugins/remotes/lib/remotetab.py | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/remotes/html/stage.js b/openlp/plugins/remotes/html/stage.js index 09c82c49b..8db92b39a 100644 --- a/openlp/plugins/remotes/html/stage.js +++ b/openlp/plugins/remotes/html/stage.js @@ -121,11 +121,11 @@ window.OpenLP = { $("#nextslide").html(text); } }, - updateClock: function() { + updateClock: function(data) { var div = $("#clock"); var t = new Date(); var h = t.getHours(); - if (h > 12) + if (data.results.twelve && h > 12) h = h - 12; var m = t.getMinutes(); if (m < 10) @@ -136,7 +136,7 @@ window.OpenLP = { $.getJSON( "/api/poll", function (data, status) { - OpenLP.updateClock(); + OpenLP.updateClock(data); if (OpenLP.currentItem != data.results.item) { OpenLP.currentItem = data.results.item; OpenLP.loadSlides(); diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index a01691284..522c354b8 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -397,7 +397,9 @@ class HttpConnection(object): result = { u'slide': self.parent.current_slide or 0, u'item': self.parent.current_item._uuid \ - if self.parent.current_item else u'' + if self.parent.current_item else u'', + u'twelve':QtCore.QSettings().value( + u'remotes/twelve hour', QtCore.QVariant(True)).toBool() } return HttpResponse(json.dumps({u'results': result}), {u'Content-Type': u'application/json'}) diff --git a/openlp/plugins/remotes/lib/remotetab.py b/openlp/plugins/remotes/lib/remotetab.py index 03781ae06..d2b5659fe 100644 --- a/openlp/plugins/remotes/lib/remotetab.py +++ b/openlp/plugins/remotes/lib/remotetab.py @@ -57,6 +57,9 @@ class RemoteTab(SettingsTab): QtCore.QObject.connect(self.addressEdit, QtCore.SIGNAL(u'textChanged(const QString&)'), self.setUrls) self.serverSettingsLayout.addRow(self.addressLabel, self.addressEdit) + self.twelveHourCheckBox = QtGui.QCheckBox(self.serverSettingsGroupBox) + self.twelveHourCheckBox.setObjectName(u'twelveHourCheckBox') + self.serverSettingsLayout.addRow(self.twelveHourCheckBox) self.portLabel = QtGui.QLabel(self.serverSettingsGroupBox) self.portLabel.setObjectName(u'portLabel') self.portSpinBox = QtGui.QSpinBox(self.serverSettingsGroupBox) @@ -80,6 +83,9 @@ class RemoteTab(SettingsTab): self.leftLayout.addWidget(self.serverSettingsGroupBox) self.leftLayout.addStretch() self.rightLayout.addStretch() + QtCore.QObject.connect(self.twelveHourCheckBox, + QtCore.SIGNAL(u'stateChanged(int)'), + self.onTwelveHourCheckBoxChanged) def retranslateUi(self): self.serverSettingsGroupBox.setTitle( @@ -92,6 +98,9 @@ class RemoteTab(SettingsTab): 'Remote URL:')) self.stageUrlLabel.setText(translate('RemotePlugin.RemoteTab', 'Stage view URL:')) + self.twelveHourCheckBox.setText( + translate('RemotePlugin.RemoteTab', + 'Display stage time in 12hr format')) def setUrls(self): ipAddress = u'localhost' @@ -123,6 +132,10 @@ class RemoteTab(SettingsTab): self.addressEdit.setText( QtCore.QSettings().value(self.settingsSection + u'/ip address', QtCore.QVariant(ZERO_URL)).toString()) + self.twelveHour = QtCore.QSettings().value( + self.settingsSection + u'/twelve hour', + QtCore.QVariant(True)).toBool() + self.twelveHourCheckBox.setChecked(self.twelveHour) self.setUrls() def save(self): @@ -130,3 +143,11 @@ class RemoteTab(SettingsTab): QtCore.QVariant(self.portSpinBox.value())) QtCore.QSettings().setValue(self.settingsSection + u'/ip address', QtCore.QVariant(self.addressEdit.text())) + QtCore.QSettings().setValue(self.settingsSection + u'/twelve hour', + QtCore.QVariant(self.twelveHour)) + + def onTwelveHourCheckBoxChanged(self, check_state): + self.twelveHour = False + # we have a set value convert to True/False + if check_state == QtCore.Qt.Checked: + self.twelveHour = True From 9b5074991ce895696c5837495e77c1b883b7ce6e Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 1 Oct 2011 21:33:53 +0100 Subject: [PATCH 07/14] Add new dialog --- openlp/core/ui/themeform.py | 11 +++++++---- openlp/core/ui/themewizard.py | 21 +++++---------------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 743b0ca2d..1ac2cf754 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -230,7 +230,10 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): Detects Page changes and updates as approprate. """ if self.page(pageId) == self.areaPositionPage: + self.setOption(QtGui.QWizard.HaveCustomButton1, True) self._generate_layout() + else: + self.setOption(QtGui.QWizard.HaveCustomButton1, False) if self.page(pageId) == self.previewPage: self.updateTheme() frame = self.thememanager.generateImage(self.theme) @@ -250,10 +253,10 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): paint.drawRect(self.thememanager.mainwindow.renderer.get_footer_rectangle(self.theme)) paint.end() pixmap = pixmap.scaledToHeight(150, QtCore.Qt.SmoothTransformation) - self.themeLayoutLabel.setFixedSize(pixmap.width() + 2, pixmap.height() + 2) - self.themeLayoutLabel.setPixmap(pixmap) - self.displayAspectRatio = float(pixmap.width()) / pixmap.height() - self.resizeEvent() + #self.themeLayoutLabel.setFixedSize(pixmap.width() + 2, pixmap.height() + 2) + #self.themeLayoutLabel.setPixmap(pixmap) + #self.displayAspectRatio = float(pixmap.width()) / pixmap.height() + #self.resizeEvent() def onOutlineCheckCheckBoxStateChanged(self, state): """ diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py index 12ae97d0d..76b9ba3a8 100644 --- a/openlp/core/ui/themewizard.py +++ b/openlp/core/ui/themewizard.py @@ -38,7 +38,8 @@ class Ui_ThemeWizard(object): themeWizard.setModal(True) themeWizard.setWizardStyle(QtGui.QWizard.ModernStyle) themeWizard.setOptions(QtGui.QWizard.IndependentPages | - QtGui.QWizard.NoBackButtonOnStartPage) + QtGui.QWizard.NoBackButtonOnStartPage | + QtGui.QWizard.HaveCustomButton1) self.spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) # Welcome Page @@ -336,21 +337,6 @@ class Ui_ThemeWizard(object): self.footerPositionLayout.addRow(self.footerHeightLabel, self.footerHeightSpinBox) self.areaPositionLayout.addWidget(self.footerPositionGroupBox) - self.layoutArea = QtGui.QWidget(self.areaPositionPage) - self.layoutArea.setObjectName(u'LayoutArea') - self.themeLayoutPreview = QtGui.QGridLayout(self.layoutArea) - self.themeLayoutPreview.setMargin(0) - self.themeLayoutPreview.setColumnStretch(0, 1) - self.themeLayoutPreview.setRowStretch(0, 1) - self.themeLayoutLabel = QtGui.QLabel(self.areaPositionPage) - self.themeLayoutLabel.setObjectName(u'ThemeLayoutPreview') - self.themeLayoutLabel.setObjectName(u'ThemeLayoutPreview') - self.themeLayoutLabel = QtGui.QLabel(self.layoutArea) - self.themeLayoutLabel.setFrameShape(QtGui.QFrame.Box) - self.themeLayoutLabel.setScaledContents(True) - self.themeLayoutLabel.setObjectName(u'ThemeLayoutLabel') - self.areaPositionLayout.addWidget(self.themeLayoutLabel) - self.areaPositionLayout.addWidget(self.layoutArea) themeWizard.addPage(self.areaPositionPage) # Preview Page self.previewPage = QtGui.QWizardPage() @@ -550,6 +536,9 @@ class Ui_ThemeWizard(object): translate('OpenLP.ThemeWizard', 'px')) self.footerPositionCheckBox.setText( translate('OpenLP.ThemeWizard', 'Use default location')) + themeWizard.setOption(QtGui.QWizard.HaveCustomButton1, False) + themeWizard.setButtonText(QtGui.QWizard.CustomButton1, + translate('OpenLP.ThemeWizard', 'Preview')) self.previewPage.setTitle( translate('OpenLP.ThemeWizard', 'Save and Preview')) self.previewPage.setSubTitle( From 297a25001031925f19f48ea2a51eba432dafe8ac Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 2 Oct 2011 08:52:28 +0100 Subject: [PATCH 08/14] Display works but bigggggggggg --- openlp/core/ui/__init__.py | 1 + openlp/core/ui/themeform.py | 21 ++++---- openlp/core/ui/themelayoutdialog.py | 65 +++++++++++++++++++++++ openlp/core/ui/themelayoutform.py | 54 +++++++++++++++++++ resources/forms/themelayout.ui | 81 +++++++++++++++++++++++++++++ 5 files changed, 213 insertions(+), 9 deletions(-) create mode 100644 openlp/core/ui/themelayoutdialog.py create mode 100644 openlp/core/ui/themelayoutform.py create mode 100644 resources/forms/themelayout.ui diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py index e754480e0..7d2dfa0ba 100644 --- a/openlp/core/ui/__init__.py +++ b/openlp/core/ui/__init__.py @@ -54,6 +54,7 @@ class HideMode(object): from firsttimeform import FirstTimeForm from firsttimelanguageform import FirstTimeLanguageForm +from themelayoutform import ThemeLayoutForm from themeform import ThemeForm from filerenameform import FileRenameForm from starttimeform import StartTimeForm diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 1ac2cf754..cbb83073d 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -33,6 +33,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import Receiver, translate from openlp.core.lib.theme import BackgroundType, BackgroundGradientType from openlp.core.lib.ui import UiStrings, critical_error_message_box +from openlp.core.ui import ThemeLayoutForm from openlp.core.utils import get_images_filter from themewizard import Ui_ThemeWizard @@ -58,6 +59,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.registerFields() self.updateThemeAllowed = True self.temp_background_filename = u'' + self.themeLayoutForm = ThemeLayoutForm(self) QtCore.QObject.connect(self.backgroundComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), self.onBackgroundComboBoxCurrentIndexChanged) @@ -88,6 +90,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.onShadowCheckCheckBoxStateChanged) QtCore.QObject.connect(self.footerColorButton, QtCore.SIGNAL(u'clicked()'), self.onFooterColorButtonClicked) + QtCore.QObject.connect(self, + QtCore.SIGNAL(u'customButtonClicked(int)'), + self.onCustom1ButtonClicked) QtCore.QObject.connect(self.mainPositionCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), self.onMainPositionCheckBoxStateChanged) @@ -231,7 +236,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): """ if self.page(pageId) == self.areaPositionPage: self.setOption(QtGui.QWizard.HaveCustomButton1, True) - self._generate_layout() else: self.setOption(QtGui.QWizard.HaveCustomButton1, False) if self.page(pageId) == self.previewPage: @@ -241,22 +245,21 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.displayAspectRatio = float(frame.width()) / frame.height() self.resizeEvent() - def _generate_layout(self): + def onCustom1ButtonClicked(self, number): width = self.thememanager.mainwindow.renderer.width height = self.thememanager.mainwindow.renderer.height pixmap = QtGui.QPixmap(width, height) pixmap.fill(QtCore.Qt.white) paint = QtGui.QPainter(pixmap) paint.setPen(QtGui.QPen(QtCore.Qt.blue, 2)) - paint.drawRect(self.thememanager.mainwindow.renderer.get_main_rectangle(self.theme)) + paint.drawRect(self.thememanager.mainwindow.renderer. + get_main_rectangle(self.theme)) paint.setPen(QtGui.QPen(QtCore.Qt.red, 2)) - paint.drawRect(self.thememanager.mainwindow.renderer.get_footer_rectangle(self.theme)) + paint.drawRect(self.thememanager.mainwindow.renderer. + get_footer_rectangle(self.theme)) paint.end() - pixmap = pixmap.scaledToHeight(150, QtCore.Qt.SmoothTransformation) - #self.themeLayoutLabel.setFixedSize(pixmap.width() + 2, pixmap.height() + 2) - #self.themeLayoutLabel.setPixmap(pixmap) - #self.displayAspectRatio = float(pixmap.width()) / pixmap.height() - #self.resizeEvent() + self.themeLayoutForm.exec_(pixmap) + def onOutlineCheckCheckBoxStateChanged(self, state): """ diff --git a/openlp/core/ui/themelayoutdialog.py b/openlp/core/ui/themelayoutdialog.py new file mode 100644 index 000000000..d9770be23 --- /dev/null +++ b/openlp/core/ui/themelayoutdialog.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2011 Raoul Snyman # +# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan # +# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, # +# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias # +# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # +# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + +from PyQt4 import QtCore, QtGui + +from openlp.core.lib import translate +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) + self.previewLayout = QtGui.QVBoxLayout(themeLayoutDialog) + self.previewLayout.setObjectName(u'PreviewLayout') + self.previewArea = QtGui.QWidget(themeLayoutDialog) + self.previewArea.setObjectName(u'PreviewArea') + self.previewAreaLayout = QtGui.QGridLayout(self.previewArea) + self.previewAreaLayout.setMargin(0) + self.previewAreaLayout.setColumnStretch(0, 1) + self.previewAreaLayout.setRowStretch(0, 1) + self.previewAreaLayout.setObjectName(u'PreviewAreaLayout') + self.themeDisplayLabel = QtGui.QLabel(self.previewArea) + self.themeDisplayLabel.setFrameShape(QtGui.QFrame.Box) + self.themeDisplayLabel.setScaledContents(True) + self.themeDisplayLabel.setObjectName(u'ThemeDisplayLabel') + self.previewAreaLayout.addWidget(self.themeDisplayLabel) + self.previewLayout.addWidget(self.previewArea) + self.buttonBox = QtGui.QDialogButtonBox(themeLayoutDialog) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok) + self.buttonBox.setObjectName(u'ButtonBox') + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'), + themeLayoutDialog.accept) + self.previewLayout.addWidget(self.buttonBox) + self.retranslateUi(themeLayoutDialog) + QtCore.QMetaObject.connectSlotsByName(themeLayoutDialog) + + def retranslateUi(self, themeLayoutDialog): + themeLayoutDialog.setWindowTitle( + translate('OpenLP.StartTimeForm', 'Theme Layout')) + diff --git a/openlp/core/ui/themelayoutform.py b/openlp/core/ui/themelayoutform.py new file mode 100644 index 000000000..b1984c01a --- /dev/null +++ b/openlp/core/ui/themelayoutform.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2011 Raoul Snyman # +# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan # +# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, # +# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias # +# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # +# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + +from PyQt4 import QtGui, QtCore + +from themelayoutdialog import Ui_ThemeLayoutDialog + +from openlp.core.lib import translate +from openlp.core.lib.ui import UiStrings, critical_error_message_box + +class ThemeLayoutForm(QtGui.QDialog, Ui_ThemeLayoutDialog): + """ + The exception dialog + """ + def __init__(self, parent): + QtGui.QDialog.__init__(self, parent) + self.setupUi(self) + + def exec_(self, image): + """ + Run the Dialog with correct heading. + """ + pixmap = image.scaledToHeight(150, QtCore.Qt.SmoothTransformation) + self.themeDisplayLabel.setPixmap(image) + return QtGui.QDialog.exec_(self) + + def accept(self): + return QtGui.QDialog.accept(self) + + diff --git a/resources/forms/themelayout.ui b/resources/forms/themelayout.ui new file mode 100644 index 000000000..2152fc5d0 --- /dev/null +++ b/resources/forms/themelayout.ui @@ -0,0 +1,81 @@ + + + ThemeLayout + + + + 0 + 0 + 400 + 300 + + + + Theme Layout + + + + + 50 + 260 + 341 + 32 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 20 + 10 + 361 + 231 + + + + + + + + + + + buttonBox + accepted() + ThemeLayout + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + ThemeLayout + reject() + + + 316 + 260 + + + 286 + 274 + + + + + From 6426d9aac4e01a8bff73b35916afb62df28350a1 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 2 Oct 2011 17:38:05 +0100 Subject: [PATCH 09/14] Display is now big enough --- openlp/core/ui/themeform.py | 6 +++--- openlp/core/ui/themelayoutdialog.py | 2 +- openlp/core/ui/themelayoutform.py | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index cbb83073d..064652488 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -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): """ diff --git a/openlp/core/ui/themelayoutdialog.py b/openlp/core/ui/themelayoutdialog.py index d9770be23..58c09fb26 100644 --- a/openlp/core/ui/themelayoutdialog.py +++ b/openlp/core/ui/themelayoutdialog.py @@ -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) diff --git a/openlp/core/ui/themelayoutform.py b/openlp/core/ui/themelayoutform.py index b1984c01a..6f77d31da 100644 --- a/openlp/core/ui/themelayoutform.py +++ b/openlp/core/ui/themelayoutform.py @@ -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) - From c5a7127aec29e1a86530efaf0e41ff16be65d2ba Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 2 Oct 2011 20:49:29 +0100 Subject: [PATCH 10/14] Copy theme during remote edit. Fixes: https://launchpad.net/bugs/864822 --- openlp/core/lib/serviceitem.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index 3170e0a93..941f54897 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -364,6 +364,9 @@ class ServiceItem(object): """ self._uuid = other._uuid self.notes = other.notes + # copy theme over if present. Assumes overridden + if other.theme is not None: + self.theme = other.theme if self.is_capable(ItemCapabilities.HasBackgroundAudio): log.debug(self.background_audio) From 9f9f2186aeecccb4720deb18232184ee413c4daf Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 2 Oct 2011 20:57:42 +0100 Subject: [PATCH 11/14] Minor performance improvement --- openlp/core/lib/serviceitem.py | 2 +- openlp/core/ui/servicemanager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index 941f54897..a48ef157d 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -366,7 +366,7 @@ class ServiceItem(object): self.notes = other.notes # copy theme over if present. Assumes overridden if other.theme is not None: - self.theme = other.theme + self.update_theme(other.theme) if self.is_capable(ItemCapabilities.HasBackgroundAudio): log.debug(self.background_audio) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index c9f058351..8ad2db9c2 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -1160,7 +1160,6 @@ class ServiceManager(QtGui.QWidget): # if not passed set to config value if expand is None: expand = self.expandTabs - item.render() item.from_service = True if replace: sitem, child = self.findServiceItem() @@ -1169,6 +1168,7 @@ class ServiceManager(QtGui.QWidget): self.repaintServiceList(sitem, child) self.mainwindow.liveController.replaceServiceManagerItem(item) else: + item.render() # nothing selected for dnd if self.dropPosition == 0: if isinstance(item, list): From 5053e27c76f937f536699bbac2546056237e82a9 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Mon, 3 Oct 2011 17:53:54 +0100 Subject: [PATCH 12/14] Fix up review comments --- openlp/core/lib/renderer.py | 4 ++-- openlp/core/lib/serviceitem.py | 6 ++++-- openlp/core/ui/themeform.py | 3 ++- openlp/plugins/remotes/lib/remotetab.py | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 3d0d1e080..960dde7fa 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -310,7 +310,7 @@ class Renderer(object): def get_main_rectangle(self, theme): """ - Calculates the placement and size of the main rectangle + Calculates the placement and size of the main rectangle. ``theme`` The theme information @@ -323,7 +323,7 @@ class Renderer(object): def get_footer_rectangle(self, theme): """ - Calculates the placement and size of the main rectangle + Calculates the placement and size of the footer rectangle. ``theme`` The theme information diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index a48ef157d..510d71cde 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -364,9 +364,11 @@ class ServiceItem(object): """ self._uuid = other._uuid self.notes = other.notes - # copy theme over if present. Assumes overridden + # Copy theme over if present. if other.theme is not None: - self.update_theme(other.theme) + self.theme = other.theme + self._new_item() + self.render() if self.is_capable(ItemCapabilities.HasBackgroundAudio): log.debug(self.background_audio) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 064652488..f91beb429 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -247,8 +247,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): def onCustom1ButtonClicked(self, number): """ - Generate layout preview and display the form + Generate layout preview and display the form. """ + self.updateTheme() width = self.thememanager.mainwindow.renderer.width height = self.thememanager.mainwindow.renderer.height pixmap = QtGui.QPixmap(width, height) diff --git a/openlp/plugins/remotes/lib/remotetab.py b/openlp/plugins/remotes/lib/remotetab.py index d2b5659fe..95bb27f1c 100644 --- a/openlp/plugins/remotes/lib/remotetab.py +++ b/openlp/plugins/remotes/lib/remotetab.py @@ -100,7 +100,7 @@ class RemoteTab(SettingsTab): 'Stage view URL:')) self.twelveHourCheckBox.setText( translate('RemotePlugin.RemoteTab', - 'Display stage time in 12hr format')) + 'Display stage time in 12h format')) def setUrls(self): ipAddress = u'localhost' From 159a95855f781769510640dacabef70274c400f7 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 5 Oct 2011 17:14:21 +0100 Subject: [PATCH 13/14] Change Text --- openlp/core/ui/themelayoutdialog.py | 10 ++++++++++ openlp/core/ui/themewizard.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/themelayoutdialog.py b/openlp/core/ui/themelayoutdialog.py index 58c09fb26..d2c91619f 100644 --- a/openlp/core/ui/themelayoutdialog.py +++ b/openlp/core/ui/themelayoutdialog.py @@ -50,6 +50,12 @@ class Ui_ThemeLayoutDialog(object): self.themeDisplayLabel.setObjectName(u'ThemeDisplayLabel') self.previewAreaLayout.addWidget(self.themeDisplayLabel) self.previewLayout.addWidget(self.previewArea) + self.mainColourLabel = QtGui.QLabel(self.previewArea) + self.mainColourLabel.setObjectName(u'MainColourLabel') + self.previewLayout.addWidget(self.mainColourLabel) + self.footerColourLabel = QtGui.QLabel(self.previewArea) + self.footerColourLabel.setObjectName(u'FooterColourLabel') + self.previewLayout.addWidget(self.footerColourLabel) self.buttonBox = QtGui.QDialogButtonBox(themeLayoutDialog) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok) self.buttonBox.setObjectName(u'ButtonBox') @@ -62,4 +68,8 @@ class Ui_ThemeLayoutDialog(object): def retranslateUi(self, themeLayoutDialog): themeLayoutDialog.setWindowTitle( translate('OpenLP.StartTimeForm', 'Theme Layout')) + self.mainColourLabel.setText(translate('OpenLP.StartTimeForm', + 'The main layout area is shown by a blue box.')) + self.footerColourLabel.setText(translate('OpenLP.StartTimeForm', + 'The footer layout area is shown by a red box.')) diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py index 76b9ba3a8..1135db274 100644 --- a/openlp/core/ui/themewizard.py +++ b/openlp/core/ui/themewizard.py @@ -538,7 +538,7 @@ class Ui_ThemeWizard(object): translate('OpenLP.ThemeWizard', 'Use default location')) themeWizard.setOption(QtGui.QWizard.HaveCustomButton1, False) themeWizard.setButtonText(QtGui.QWizard.CustomButton1, - translate('OpenLP.ThemeWizard', 'Preview')) + translate('OpenLP.ThemeWizard', 'Layout Preview')) self.previewPage.setTitle( translate('OpenLP.ThemeWizard', 'Save and Preview')) self.previewPage.setSubTitle( From 575aa020222960b147bb39a2f3e38bdd05d94e0d Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 5 Oct 2011 18:18:56 +0100 Subject: [PATCH 14/14] Amend text --- openlp/core/ui/themelayoutdialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/themelayoutdialog.py b/openlp/core/ui/themelayoutdialog.py index d2c91619f..5be08ad65 100644 --- a/openlp/core/ui/themelayoutdialog.py +++ b/openlp/core/ui/themelayoutdialog.py @@ -69,7 +69,7 @@ class Ui_ThemeLayoutDialog(object): themeLayoutDialog.setWindowTitle( translate('OpenLP.StartTimeForm', 'Theme Layout')) self.mainColourLabel.setText(translate('OpenLP.StartTimeForm', - 'The main layout area is shown by a blue box.')) + 'The blue box shows the main area.')) self.footerColourLabel.setText(translate('OpenLP.StartTimeForm', - 'The footer layout area is shown by a red box.')) + 'The red box shows the footer.'))