Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Orange/widgets/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3084,6 +3084,10 @@ class VerticalItemDelegate(QStyledItemDelegate):
# Extra text top/bottom margin.
Margin = 6

def __init__(self, extend=False):
super().__init__()
self._extend = extend # extend text over cell borders

def sizeHint(self, option, index):
sh = super().sizeHint(option, index)
return QtCore.QSize(sh.height() + self.Margin * 2, sh.width())
Expand Down Expand Up @@ -3121,6 +3125,8 @@ def paint(self, painter, option, index):
offset = -offset

textrect.translate(0, offset)
if self._extend and brect.width() > itemrect.width():
textrect.setWidth(brect.width())

painter.translate(option.rect.x(), option.rect.bottom())
painter.rotate(-90)
Expand Down