diff --git a/manuskript/ui/views/outlineDelegates.py b/manuskript/ui/views/outlineDelegates.py index 48bba8ee..4fdc0f23 100644 --- a/manuskript/ui/views/outlineDelegates.py +++ b/manuskript/ui/views/outlineDelegates.py @@ -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: diff --git a/manuskript/ui/views/treeDelegates.py b/manuskript/ui/views/treeDelegates.py index fa59702c..2e162e41 100644 --- a/manuskript/ui/views/treeDelegates.py +++ b/manuskript/ui/views/treeDelegates.py @@ -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)