mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-29 10:12:34 -04:00
Use the correct style when custom painintg the icon
This commit is contained in:
@@ -763,7 +763,7 @@ class CcBoolDelegate(QStyledItemDelegate, UpdateEditorGeometry): # {{{
|
||||
self.nuke_option_data = True
|
||||
super().paint(painter, option, index)
|
||||
self.nuke_option_data = False
|
||||
style = QApplication.style()
|
||||
style = option.styleObject.style() if option.styleObject else QApplication.instance().style()
|
||||
style.drawItemPixmap(painter, option.rect, Qt.AlignmentFlag.AlignCenter, icon)
|
||||
|
||||
# }}}
|
||||
|
||||
Reference in New Issue
Block a user