Resize cover images

This commit is contained in:
BasioMeusPuga
2017-11-20 09:10:10 +05:30
parent 155ef22089
commit b28a054c90
2 changed files with 26 additions and 8 deletions

View File

@@ -32,7 +32,6 @@ class Library:
print('Database returned nothing')
return
elif mode == 'addition':
# Assumes parent_window.viewModel already exists and may be extended
# Because any additional books have already been added to the
@@ -57,7 +56,6 @@ class Library:
else:
return
for i in books:
# The database query returns (or the extension data is)
# an iterable with the following indices:
@@ -106,7 +104,7 @@ class Library:
img_pixmap.loadFromData(cover)
else:
img_pixmap.load(':/images/NotFound.png')
img_pixmap = img_pixmap.scaled(420, 600, QtCore.Qt.IgnoreAspectRatio)
img_pixmap = img_pixmap.scaled(420, 600, QtCore.Qt.IgnoreAspectRatio)
item = QtGui.QStandardItem()
item.setToolTip(tooltip_string)
# The following order is needed to keep sorting working