openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #12110
[Merge] lp:~trb143/openlp/features-198 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/features-198 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #802252 in OpenLP: "Add "Justify" as theme horizontal alignment option"
https://bugs.launchpad.net/openlp/+bug/802252
For more details, see:
https://code.launchpad.net/~trb143/openlp/features-198/+merge/76887
Add the option to allow Justify from themes
--
https://code.launchpad.net/~trb143/openlp/features-198/+merge/76887
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/features-198 into lp:openlp.
=== modified file 'openlp/core/lib/htmlbuilder.py'
--- openlp/core/lib/htmlbuilder.py 2011-07-20 13:05:30 +0000
+++ openlp/core/lib/htmlbuilder.py 2011-09-25 06:43:52 +0000
@@ -557,11 +557,15 @@
left_margin = int(theme.font_main_outline_size) * 2
else:
left_margin = 0
- lyrics = u'white-space:pre-wrap; word-wrap: break-word; ' \
+ justify = u'white-space:pre-wrap;'
+ # fix tag incompatibilities
+ if theme.display_horizontal_align == HorizontalType.Justify:
+ justify = u''
+ lyrics = u'%s word-wrap: break-word; ' \
'text-align: %s; vertical-align: %s; font-family: %s; ' \
'font-size: %spt; color: %s; line-height: %d%%; margin: 0;' \
'padding: 0; padding-left: %spx; width: %spx; height: %spx; ' % \
- (align, valign, theme.font_main_name, theme.font_main_size,
+ (justify, align, valign, theme.font_main_name, theme.font_main_size,
theme.font_main_color, 100 + int(theme.font_main_line_adjustment),
left_margin, width, height)
if theme.font_main_outline:
=== modified file 'openlp/core/lib/theme.py'
--- openlp/core/lib/theme.py 2011-08-20 11:45:06 +0000
+++ openlp/core/lib/theme.py 2011-09-25 06:43:52 +0000
@@ -176,8 +176,9 @@
Left = 0
Right = 1
Center = 2
+ Justify = 3
- Names = [u'left', u'right', u'center']
+ Names = [u'left', u'right', u'center', u'justify']
class VerticalType(object):
=== modified file 'openlp/core/ui/themewizard.py'
--- openlp/core/ui/themewizard.py 2011-08-25 18:33:25 +0000
+++ openlp/core/ui/themewizard.py 2011-09-25 06:43:52 +0000
@@ -246,7 +246,7 @@
self.horizontalLabel = QtGui.QLabel(self.alignmentPage)
self.horizontalLabel.setObjectName(u'HorizontalLabel')
self.horizontalComboBox = QtGui.QComboBox(self.alignmentPage)
- self.horizontalComboBox.addItems([u'', u'', u''])
+ self.horizontalComboBox.addItems([u'', u'', u'', u''])
self.horizontalComboBox.setObjectName(u'HorizontalComboBox')
self.alignmentLayout.addRow(self.horizontalLabel,
self.horizontalComboBox)
@@ -495,6 +495,8 @@
translate('OpenLP.ThemeWizard', 'Right'))
self.horizontalComboBox.setItemText(HorizontalType.Center,
translate('OpenLP.ThemeWizard', 'Center'))
+ self.horizontalComboBox.setItemText(HorizontalType.Justify,
+ translate('OpenLP.ThemeWizard', 'Justify'))
self.transitionsLabel.setText(
translate('OpenLP.ThemeWizard', 'Transitions:'))
self.areaPositionPage.setTitle(
Follow ups