forked from openlp/openlp
New Manifest file
This commit is contained in:
parent
a5367b647f
commit
83334a19e9
@ -3,6 +3,7 @@ recursive-include openlp *.sqlite
|
|||||||
recursive-include openlp *.csv
|
recursive-include openlp *.csv
|
||||||
recursive-include openlp *.html
|
recursive-include openlp *.html
|
||||||
recursive-include openlp *.js
|
recursive-include openlp *.js
|
||||||
|
recursive-include openlp *.qm
|
||||||
recursive-include documentation *
|
recursive-include documentation *
|
||||||
recursive-include resources/forms *
|
recursive-include resources/forms *
|
||||||
recursive-include resources/i18n *
|
recursive-include resources/i18n *
|
||||||
|
@ -81,8 +81,8 @@ html_expands.append({u'desc':u'Italics', u'start tag':u'{it}',
|
|||||||
u'start html':u'<em>', u'end tag':u'{/it}', u'end html':u'</em>',
|
u'start html':u'<em>', u'end tag':u'{/it}', u'end html':u'</em>',
|
||||||
u'protected':True})
|
u'protected':True})
|
||||||
|
|
||||||
# Image cache to stop regualar image resizing
|
# Image image_cache to stop regualar image resizing
|
||||||
cache = {}
|
image_cache = {}
|
||||||
|
|
||||||
def translate(context, text, comment=None):
|
def translate(context, text, comment=None):
|
||||||
"""
|
"""
|
||||||
@ -261,9 +261,9 @@ def resize_image(image, width, height, background=QtCore.Qt.black):
|
|||||||
return preview
|
return preview
|
||||||
preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio,
|
preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio,
|
||||||
QtCore.Qt.SmoothTransformation)
|
QtCore.Qt.SmoothTransformation)
|
||||||
cache_key = u'%s%s%s' % (image, unicode(width), unicode(height))
|
image_cache_key = u'%s%s%s' % (image, unicode(width), unicode(height))
|
||||||
if cache_key in cache:
|
if image_cache_key in image_cache:
|
||||||
return cache[cache_key]
|
return image_cache[image_cache_key]
|
||||||
realw = preview.width()
|
realw = preview.width()
|
||||||
realh = preview.height()
|
realh = preview.height()
|
||||||
# and move it to the centre of the preview space
|
# and move it to the centre of the preview space
|
||||||
@ -272,8 +272,8 @@ def resize_image(image, width, height, background=QtCore.Qt.black):
|
|||||||
new_image.fill(background)
|
new_image.fill(background)
|
||||||
painter = QtGui.QPainter(new_image)
|
painter = QtGui.QPainter(new_image)
|
||||||
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
|
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
|
||||||
cache[cache_key] = new_image
|
image_cache[image_cache_key] = new_image
|
||||||
print cache
|
print image_cache
|
||||||
return new_image
|
return new_image
|
||||||
|
|
||||||
def check_item_selected(list_widget, message):
|
def check_item_selected(list_widget, message):
|
||||||
|
Loading…
Reference in New Issue
Block a user