eric6/Graphics/ModuleItem.py

changeset 7254
f00d825fbdb3
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7253:50dbe65a1334 7254:f00d825fbdb3
136 @param painter reference to the painter object (QPainter) 136 @param painter reference to the painter object (QPainter)
137 @param option style options (QStyleOptionGraphicsItem) 137 @param option style options (QStyleOptionGraphicsItem)
138 @param widget optional reference to the widget painted on (QWidget) 138 @param widget optional reference to the widget painted on (QWidget)
139 """ 139 """
140 pen = self.pen() 140 pen = self.pen()
141 if (option.state & QStyle.State_Selected) == \ 141 if (
142 QStyle.State(QStyle.State_Selected): 142 (option.state & QStyle.State_Selected) ==
143 QStyle.State(QStyle.State_Selected)
144 ):
143 pen.setWidth(2) 145 pen.setWidth(2)
144 else: 146 else:
145 pen.setWidth(1) 147 pen.setWidth(1)
146 148
147 painter.setPen(pen) 149 painter.setPen(pen)

eric ide

mercurial