eric7/WebBrowser/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationListDelegate.py

branch
eric7
changeset 9162
8b75b1668583
parent 8881
54e42bc2437a
equal deleted inserted replaced
9161:90939b08da20 9162:8b75b1668583
99 if opt2.checkState == Qt.CheckState.Checked: 99 if opt2.checkState == Qt.CheckState.Checked:
100 opt2.state |= QStyle.StateFlag.State_On 100 opt2.state |= QStyle.StateFlag.State_On
101 else: 101 else:
102 opt2.state |= QStyle.StateFlag.State_Off 102 opt2.state |= QStyle.StateFlag.State_Off
103 styleCheckBoxRect = style.subElementRect( 103 styleCheckBoxRect = style.subElementRect(
104 QStyle.SubElement.SE_ViewItemCheckIndicator, opt2, widget) 104 QStyle.SubElement.SE_CheckBoxIndicator, opt2, widget)
105 opt2.rect = QRect( 105 opt2.rect = QRect(
106 leftPos, checkBoxYPos, 106 leftPos, checkBoxYPos,
107 styleCheckBoxRect.width(), styleCheckBoxRect.height()) 107 styleCheckBoxRect.width(), styleCheckBoxRect.height())
108 style.drawPrimitive( 108 style.drawPrimitive(
109 QStyle.PrimitiveElement.PE_IndicatorViewItemCheck, opt2, painter, 109 QStyle.PrimitiveElement.PE_IndicatorCheckBox, opt2, painter,
110 widget) 110 widget)
111 leftPos = opt2.rect.right() + self.__padding 111 leftPos = opt2.rect.right() + self.__padding
112 112
113 # Draw icon 113 # Draw icon
114 iconYPos = center - GreaseMonkeyConfigurationListDelegate.IconSize // 2 114 iconYPos = center - GreaseMonkeyConfigurationListDelegate.IconSize // 2

eric ide

mercurial