diff --git a/Orange/widgets/gui.py b/Orange/widgets/gui.py index cb8636a46fe..6a08aad7101 100644 --- a/Orange/widgets/gui.py +++ b/Orange/widgets/gui.py @@ -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()) @@ -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)