openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #16364
[Merge] lp:~googol/openlp/trivial into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/trivial into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol/openlp/trivial/+merge/112944
- fixed variable name
--
https://code.launchpad.net/~googol/openlp/trivial/+merge/112944
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/trivial into lp:openlp.
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2012-06-22 14:14:53 +0000
+++ openlp/core/lib/__init__.py 2012-07-01 18:57:35 +0000
@@ -265,14 +265,15 @@
if image_ratio == resize_ratio:
# We neither need to centre the image nor add "bars" to the image.
return preview
- realw = preview.width()
- realh = preview.height()
+ real_width = preview.width()
+ real_height = preview.height()
# and move it to the centre of the preview space
new_image = QtGui.QImage(width, height,
QtGui.QImage.Format_ARGB32_Premultiplied)
painter = QtGui.QPainter(new_image)
painter.fillRect(new_image.rect(), QtGui.QColor(background))
- painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
+ painter.drawImage(
+ (width - real_width) / 2, (height - real_height) / 2, preview)
return new_image
Follow ups