mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-13 01:12:25 +12:00
Merge pull request #793 from FrancoisDuchene/notEnoughArgsFix
Fix for TypeErrors when using certain app styles
This commit is contained in:
commit
2545f9c7a3
|
@ -313,7 +313,7 @@ class outlineLabelDelegate(QStyledItemDelegate):
|
|||
idx = self.mdlLabels.indexFromItem(item)
|
||||
opt = QStyleOptionViewItem(option)
|
||||
self.initStyleOption(opt, idx)
|
||||
s = qApp.style().sizeFromContents(QStyle.CT_ItemViewItem, opt, QSize())
|
||||
s = qApp.style().sizeFromContents(QStyle.CT_ItemViewItem, opt, QSize(), None)
|
||||
if s.width() > 150:
|
||||
s.setWidth(150)
|
||||
elif s.width() < 50:
|
||||
|
|
|
@ -34,8 +34,8 @@ class treeTitleDelegate(QStyledItemDelegate):
|
|||
opt = QStyleOptionViewItem(option)
|
||||
self.initStyleOption(opt, index)
|
||||
|
||||
iconRect = style.subElementRect(style.SE_ItemViewItemDecoration, opt)
|
||||
textRect = style.subElementRect(style.SE_ItemViewItemText, opt)
|
||||
iconRect = style.subElementRect(style.SE_ItemViewItemDecoration, opt, None)
|
||||
textRect = style.subElementRect(style.SE_ItemViewItemText, opt, None)
|
||||
|
||||
# Background
|
||||
style.drawPrimitive(style.PE_PanelItemViewItem, opt, painter)
|
||||
|
|
Loading…
Reference in a new issue