diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index c67700a29..8e31d8950 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -558,11 +558,15 @@ def build_lyrics_format_css(theme, width, height): 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: diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 3b0a62f5b..34a3b9d98 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -176,8 +176,9 @@ class HorizontalType(object): 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): diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py index 6001c83d6..c7cba0ebd 100644 --- a/openlp/core/ui/themewizard.py +++ b/openlp/core/ui/themewizard.py @@ -246,7 +246,7 @@ class Ui_ThemeWizard(object): 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 @@ class Ui_ThemeWizard(object): 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(