Remove unneeded code

This commit is contained in:
Tim Bentley 2009-12-06 19:22:41 +00:00
parent 836f7c2ab7
commit 26dd28d083

View File

@ -105,25 +105,8 @@ def build_icon(icon):
ButtonIcon.addPixmap(
QtGui.QPixmap(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
else:
if len(icon) > 2:
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
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)
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
elif isinstance(icon, QtGui.QImage):
ButtonIcon = QtGui.QIcon()
ButtonIcon.addPixmap(