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