diff options
author | Hannah von Reth <hannah.vonreth@kdab.com> | 2016-03-01 09:07:11 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2016-03-25 16:31:31 +0000 |
commit | f64640f44163d868e3d101c3b0ba41d33147a5be (patch) | |
tree | 57280bfacd10f4bdee5056a48b3a15d362cdf24e /src/widgets/styles | |
parent | 705d29585b9a006b2fc8dd77ebf7a67b3670011b (diff) |
Allow to style arrows drawn with drawPrimitive in QCommonStyle.
Its currently not possible to style the arrows with QCommonStyle because
drawPrimitive from QCommonStyle is called instead from the proxy.
Change-Id: I910b13df110601cb18578bc16edfa5ddaa17bbd2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 748cef20c1..4b6e3ac5c4 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1597,7 +1597,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, if (!hasArrow) { proxy()->drawItemPixmap(p, pr, Qt::AlignCenter, pm); } else { - drawArrow(this, toolbutton, pr, p, widget); + drawArrow(proxy(), toolbutton, pr, p, widget); } alignment |= Qt::AlignCenter; } else { @@ -1607,7 +1607,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, if (!hasArrow) { proxy()->drawItemPixmap(p, QStyle::visualRect(opt->direction, rect, pr), Qt::AlignCenter, pm); } else { - drawArrow(this, toolbutton, pr, p, widget); + drawArrow(proxy(), toolbutton, pr, p, widget); } alignment |= Qt::AlignLeft | Qt::AlignVCenter; } @@ -1618,7 +1618,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, } else { rect.translate(shiftX, shiftY); if (hasArrow) { - drawArrow(this, toolbutton, rect, p, widget); + drawArrow(proxy(), toolbutton, rect, p, widget); } else { proxy()->drawItemPixmap(p, rect, Qt::AlignCenter, pm); } |