openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01300
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Fix bug in outline code for those who do not want outlines.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/22229
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2010-03-21 23:58:01 +0000
+++ openlp/core/lib/renderer.py 2010-03-26 15:09:20 +0000
@@ -505,7 +505,7 @@
self.mainFont.setPixelSize(self._theme.font_main_proportion)
def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False,
- color=None, outline_size=None, outline_color=None):
+ color=None, outline_size=0, outline_color=None):
"""
Find bounding box of text - as render_single_line. If draw is set,
actually draw the text to the current DC as well return width and
@@ -544,21 +544,23 @@
else:
pen = QtGui.QColor(color)
x, y = tlcorner
- if outline_size:
+ if self._theme.display_outline:
path = QtGui.QPainterPath()
path.addText(QtCore.QPointF(x, y + metrics.ascent()), font, line)
self.painter.setBrush(self.painter.pen().brush())
- self.painter.setPen(QtGui.QPen(QtGui.QColor(outline_color), outline_size))
+ self.painter.setPen(QtGui.QPen(
+ QtGui.QColor(self._theme.display_outline_color), outline_size))
self.painter.drawPath(path)
self.painter.setPen(pen)
self.painter.drawText(x, y + metrics.ascent(), line)
if self._theme.display_slideTransition:
# Print 2nd image with 70% weight
- if outline_size:
+ if self._theme.display_outline:
path = QtGui.QPainterPath()
path.addText(QtCore.QPointF(x, y + metrics.ascent()), font, line)
self.painter2.setBrush(self.painter2.pen().brush())
- self.painter2.setPen(QtGui.QPen(QtGui.QColor(outline_color), outline_size))
+ self.painter2.setPen(QtGui.QPen(
+ QtGui.QColor(self._theme.display_outline_color), outline_size))
self.painter2.drawPath(path)
self.painter2.setFont(font)
self.painter2.setPen(pen)
Follow ups