From 63b46966212680690e2e6fcc45ff696a9cbd278a Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 24 Jul 2010 17:55:06 +0100 Subject: [PATCH] Cleanups and ratio changes --- openlp/core/lib/__init__.py | 7 +- openlp/core/lib/htmlbuilder.py | 50 +++++++--- openlp/core/ui/maindisplay.py | 146 +++++++++++++++++------------- openlp/core/ui/mainwindow.py | 1 - openlp/core/ui/slidecontroller.py | 67 ++++++++------ 5 files changed, 164 insertions(+), 107 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 235e98163..42ea4bdac 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -174,13 +174,14 @@ def image_to_byte(image): The image to converted. """ byte_array = QtCore.QByteArray() - buffer = QtCore.QBuffer(byte_array) #// use buffer to store pixmap into byteArray - buffer.open(QtCore.QIODevice.WriteOnly) + # use buffer to store pixmap into byteArray + buffie = QtCore.QBuffer(byte_array) + buffie.open(QtCore.QIODevice.WriteOnly) if isinstance(image, QtGui.QImage): pixmap = QtGui.QPixmap.fromImage(image) else: pixmap = QtGui.QPixmap(image) - pixmap.save(buffer, "PNG") + pixmap.save(buffie, "PNG") #convert to base64 encoding so does not get missed! return byte_array.toBase64() diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 49c56aefe..8f4832e8c 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -40,6 +40,7 @@ HTMLSRC = u""" %s %s %s +%s