openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00608
[Merge] lp:~trb143/openlp/bitsandbobs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bitsandbobs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
SlideController UI improvements.
--
https://code.launchpad.net/~trb143/openlp/bitsandbobs/+merge/13649
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2009-10-18 15:02:58 +0000
+++ openlp/core/ui/slidecontroller.py 2009-10-20 16:40:24 +0000
@@ -28,6 +28,16 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import OpenLPToolbar, translate, Receiver, ServiceType
+label_stylesheet = u"""
+QTableWidget::item:selected
+{
+ border: 2px solid black;
+ background: lightgray;
+ font: italic;
+}
+"""
+
+
class SlideList(QtGui.QTableWidget):
"""
Customised version of QTableWidget which can respond to keyboard
@@ -303,19 +313,21 @@
self.PreviewListWidget.rowCount() + 1)
item = QtGui.QTableWidgetItem()
label = QtGui.QLabel()
- label.setMargin(8)
+ label.setMargin(4)
#It is a Image
if frame[u'text'] is None:
pixmap = self.parent.RenderManager.resize_image(frame[u'image'])
label.setScaledContents(True)
label.setPixmap(QtGui.QPixmap.fromImage(pixmap))
+ slide_height = self.settingsmanager.slidecontroller_image * \
+ self.parent.RenderManager.screen_ratio
else:
label.setText(frame[u'text'])
+ slide_height = label.sizeHint().height()
self.PreviewListWidget.setCellWidget(framenumber, 0, label)
self.PreviewListWidget.setItem(framenumber, 0, item)
- slide_height = self.settingsmanager.slidecontroller_image * \
- self.parent.RenderManager.screen_ratio
self.PreviewListWidget.setRowHeight(framenumber, slide_height)
+ self.PreviewListWidget.setStyleSheet(label_stylesheet)
self.PreviewListWidget.setColumnWidth(
0, self.PreviewListWidget.viewport().size().width())
if slideno > self.PreviewListWidget.rowCount():
Follow ups