summaryrefslogtreecommitdiff
path: root/qutebrowser
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-08-26 17:44:49 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-08-26 17:44:49 +0200
commitd37cc4ac73545c6a2615456a3487536c2ec00803 (patch)
tree0d8529400cd856641d3899a1bcbec7fdc7acd7fc /qutebrowser
parente61597ca817e369c958ab0b8a54ae169f64b9474 (diff)
downloadqutebrowser-d37cc4ac73545c6a2615456a3487536c2ec00803.tar.gz
qutebrowser-d37cc4ac73545c6a2615456a3487536c2ec00803.zip
Fix style enum access
Diffstat (limited to 'qutebrowser')
-rw-r--r--qutebrowser/completion/completiondelegate.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/qutebrowser/completion/completiondelegate.py b/qutebrowser/completion/completiondelegate.py
index 4e9d14d1a..ff134183b 100644
--- a/qutebrowser/completion/completiondelegate.py
+++ b/qutebrowser/completion/completiondelegate.py
@@ -94,7 +94,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
"""Draw the background of an ItemViewItem."""
assert self._opt is not None
assert self._style is not None
- self._style.drawPrimitive(self._style.PE_PanelItemViewItem, self._opt,
+ self._style.drawPrimitive(QStyle.PrimitiveElement.PE_PanelItemViewItem, self._opt,
self._painter, self._opt.widget)
def _draw_icon(self):
@@ -103,7 +103,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
assert self._style is not None
icon_rect = self._style.subElementRect(
- self._style.SE_ItemViewItemDecoration, self._opt, self._opt.widget)
+ QStyle.SubElement.SE_ItemViewItemDecoration, self._opt, self._opt.widget)
if not icon_rect.isValid():
# The rect seems to be wrong in all kind of ways if no icon should
# be displayed.
@@ -134,7 +134,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
return
text_rect_ = self._style.subElementRect(
- self._style.SE_ItemViewItemText, self._opt, self._opt.widget)
+ QStyle.SubElement.SE_ItemViewItemText, self._opt, self._opt.widget)
qtutils.ensure_valid(text_rect_)
margin = self._style.pixelMetric(QStyle.PixelMetric.PM_FocusFrameHMargin,
self._opt, self._opt.widget) + 1
@@ -257,7 +257,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
return
o = self._opt
o.rect = self._style.subElementRect(
- self._style.SE_ItemViewItemFocusRect, self._opt, self._opt.widget)
+ QStyle.SubElement.SE_ItemViewItemFocusRect, self._opt, self._opt.widget)
o.state |= int(QStyle.StateFlag.State_KeyboardFocusChange | QStyle.StateFlag.State_Item)
qtutils.ensure_valid(o.rect)
if state & QStyle.StateFlag.State_Enabled: