forked from openlp/openlp
Remove unneeded code
This commit is contained in:
parent
836f7c2ab7
commit
26dd28d083
@ -105,25 +105,8 @@ def build_icon(icon):
|
|||||||
ButtonIcon.addPixmap(
|
ButtonIcon.addPixmap(
|
||||||
QtGui.QPixmap(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QPixmap(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
else:
|
else:
|
||||||
if len(icon) > 2:
|
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
||||||
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
else:
|
|
||||||
#lets build a Icon from text
|
|
||||||
pmap = QtGui.QPixmap(u':/pages/slide.png')
|
|
||||||
painter = QtGui.QPainter(pmap)
|
|
||||||
painter.setPen(QtGui.QColor(QtGui.QColor.black))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily(u'Arial')
|
|
||||||
font.setBold(True)
|
|
||||||
font.setPointSize(12)
|
|
||||||
painter.setFont(font)
|
|
||||||
metrics = QtGui.QFontMetrics(font)
|
|
||||||
painter.drawText(5, 3 + metrics.ascent(), icon)
|
|
||||||
painter.end()
|
|
||||||
ButtonIcon.addPixmap(
|
|
||||||
pmap, QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
|
|
||||||
elif isinstance(icon, QtGui.QImage):
|
elif isinstance(icon, QtGui.QImage):
|
||||||
ButtonIcon = QtGui.QIcon()
|
ButtonIcon = QtGui.QIcon()
|
||||||
ButtonIcon.addPixmap(
|
ButtonIcon.addPixmap(
|
||||||
|
Loading…
Reference in New Issue
Block a user