mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-02-24 12:10:06 -05:00
Use the correct style when custom painintg the icon
This commit is contained in:
parent
3ff4979673
commit
3beb835042
@ -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)
|
||||
|
||||
# }}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user