Merge lp:~j-corwin/openlp/bug-891775 into lp:openlp

Proposed by Jonathan Corwin
Status: Merged
Merged at revision: 1914
Proposed branch: lp:~j-corwin/openlp/bug-891775
Merge into: lp:openlp
Diff against target: 54 lines (+10/-4)
2 files modified
openlp/core/lib/htmlbuilder.py (+7/-2)
openlp/core/lib/renderer.py (+3/-2)
To merge this branch: bzr merge lp:~j-corwin/openlp/bug-891775
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Tim Bentley Approve
Review via email: mp+98752@code.launchpad.net

Description of the change

When the theme is bottom-aligned, stop the tails for y's and g's from being chopped off.

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) :
review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openlp/core/lib/htmlbuilder.py'
--- openlp/core/lib/htmlbuilder.py 2012-01-07 23:03:14 +0000
+++ openlp/core/lib/htmlbuilder.py 2012-03-21 22:36:45 +0000
@@ -458,13 +458,18 @@
458 # fix tag incompatibilities458 # fix tag incompatibilities
459 if theme.display_horizontal_align == HorizontalType.Justify:459 if theme.display_horizontal_align == HorizontalType.Justify:
460 justify = u''460 justify = u''
461 if theme.display_vertical_align == VerticalType.Bottom:
462 padding_bottom = u'0.5em'
463 else:
464 padding_bottom = u'0'
461 lyrics = u'%s word-wrap: break-word; ' \465 lyrics = u'%s word-wrap: break-word; ' \
462 'text-align: %s; vertical-align: %s; font-family: %s; ' \466 'text-align: %s; vertical-align: %s; font-family: %s; ' \
463 'font-size: %spt; color: %s; line-height: %d%%; margin: 0;' \467 'font-size: %spt; color: %s; line-height: %d%%; margin: 0;' \
464 'padding: 0; padding-left: %spx; width: %spx; height: %spx; ' % \468 'padding: 0; padding-bottom: %s; padding-left: %spx; width: %spx;' \
469 'height: %spx; ' % \
465 (justify, align, valign, theme.font_main_name, theme.font_main_size,470 (justify, align, valign, theme.font_main_name, theme.font_main_size,
466 theme.font_main_color, 100 + int(theme.font_main_line_adjustment),471 theme.font_main_color, 100 + int(theme.font_main_line_adjustment),
467 left_margin, width, height)472 padding_bottom, left_margin, width, height)
468 if theme.font_main_outline:473 if theme.font_main_outline:
469 if webkit_version() <= 534.3:474 if webkit_version() <= 534.3:
470 lyrics += u' letter-spacing: 1px;'475 lyrics += u' letter-spacing: 1px;'
471476
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2011-12-27 10:33:55 +0000
+++ openlp/core/lib/renderer.py 2012-03-21 22:36:45 +0000
@@ -289,7 +289,7 @@
289289
290 def _calculate_default(self):290 def _calculate_default(self):
291 """291 """
292 Calculate the default dimentions of the screen.292 Calculate the default dimensions of the screen.
293 """293 """
294 screen_size = self.screens.current[u'size']294 screen_size = self.screens.current[u'size']
295 self.width = screen_size.width()295 self.width = screen_size.width()
@@ -380,6 +380,7 @@
380 (build_lyrics_format_css(self.theme_data, self.page_width,380 (build_lyrics_format_css(self.theme_data, self.page_width,
381 self.page_height), build_lyrics_outline_css(self.theme_data))381 self.page_height), build_lyrics_outline_css(self.theme_data))
382 self.web.setHtml(html)382 self.web.setHtml(html)
383 self.empty_height = self.web_frame.contentsSize().height()
383384
384 def _paginate_slide(self, lines, line_end):385 def _paginate_slide(self, lines, line_end):
385 """386 """
@@ -600,7 +601,7 @@
600 """601 """
601 self.web_frame.evaluateJavaScript(u'show_text("%s")' %602 self.web_frame.evaluateJavaScript(u'show_text("%s")' %
602 text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'))603 text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'))
603 return self.web_frame.contentsSize().height() <= self.page_height604 return self.web_frame.contentsSize().height() <= self.empty_height
604605
605 def _words_split(self, line):606 def _words_split(self, line):
606 """607 """