mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
|
self.nuke_option_data = True
|
||||||
super().paint(painter, option, index)
|
super().paint(painter, option, index)
|
||||||
self.nuke_option_data = False
|
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)
|
style.drawItemPixmap(painter, option.rect, Qt.AlignmentFlag.AlignCenter, icon)
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user