forked from openlp/openlp
true division
This commit is contained in:
parent
62c5908d85
commit
1e11f4d821
@ -76,7 +76,7 @@ class ListPreviewWidget(QtGui.QTableWidget):
|
||||
else:
|
||||
# Sort out image heights.
|
||||
for framenumber in range(len(self.service_item.get_frames())):
|
||||
height = self.viewport().width() / self.screen_ratio
|
||||
height = self.viewport().width() // self.screen_ratio
|
||||
self.setRowHeight(framenumber, height)
|
||||
|
||||
def screen_size_changed(self, screen_ratio):
|
||||
@ -101,7 +101,7 @@ class ListPreviewWidget(QtGui.QTableWidget):
|
||||
for framenumber, frame in enumerate(self.service_item.get_frames()):
|
||||
self.setRowCount(self.slide_count() + 1)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
slideHeight = 0
|
||||
slide_height = 0
|
||||
if self.service_item.is_text():
|
||||
if frame[u'verseTag']:
|
||||
# These tags are already translated.
|
||||
@ -125,12 +125,12 @@ class ListPreviewWidget(QtGui.QTableWidget):
|
||||
image = self.image_manager.get_image(frame[u'path'], ImageSource.ImagePlugin)
|
||||
label.setPixmap(QtGui.QPixmap.fromImage(image))
|
||||
self.setCellWidget(framenumber, 0, label)
|
||||
slideHeight = width / self.screen_ratio
|
||||
slide_height = width // self.screen_ratio
|
||||
row += 1
|
||||
text.append(unicode(row))
|
||||
self.setItem(framenumber, 0, item)
|
||||
if slideHeight:
|
||||
self.setRowHeight(framenumber, slideHeight)
|
||||
if slide_height:
|
||||
self.setRowHeight(framenumber, slide_height)
|
||||
self.setVerticalHeaderLabels(text)
|
||||
if self.service_item.is_text():
|
||||
self.resizeRowsToContents()
|
||||
|
Loading…
Reference in New Issue
Block a user