9623:9c1f429cb56b | 9624:b47dfa7a137d |
---|---|
15 QStyle, | 15 QStyle, |
16 QStyledItemDelegate, | 16 QStyledItemDelegate, |
17 QStyleOptionViewItem, | 17 QStyleOptionViewItem, |
18 ) | 18 ) |
19 | 19 |
20 from eric7 import Globals | |
21 from eric7.EricGui import EricPixmapCache | 20 from eric7.EricGui import EricPixmapCache |
21 from eric7.SystemUtilities import OSUtilities | |
22 | 22 |
23 | 23 |
24 class GreaseMonkeyConfigurationListDelegate(QStyledItemDelegate): | 24 class GreaseMonkeyConfigurationListDelegate(QStyledItemDelegate): |
25 """ | 25 """ |
26 Class implementing a delegate for the special list widget for GreaseMonkey | 26 Class implementing a delegate for the special list widget for GreaseMonkey |
77 titleFont.setPointSize(titleFont.pointSize() + 1) | 77 titleFont.setPointSize(titleFont.pointSize() + 1) |
78 | 78 |
79 titleMetrics = QFontMetrics(titleFont) | 79 titleMetrics = QFontMetrics(titleFont) |
80 colorRole = ( | 80 colorRole = ( |
81 QPalette.ColorRole.Text | 81 QPalette.ColorRole.Text |
82 if Globals.isWindowsPlatform() | 82 if OSUtilities.isWindowsPlatform() |
83 else ( | 83 else ( |
84 QPalette.ColorRole.HighlightedText | 84 QPalette.ColorRole.HighlightedText |
85 if opt.state & QStyle.StateFlag.State_Selected | 85 if opt.state & QStyle.StateFlag.State_Selected |
86 else QPalette.ColorRole.Text | 86 else QPalette.ColorRole.Text |
87 ) | 87 ) |