diff options
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index fc4efa18fb..9c744000bd 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -851,7 +851,7 @@ QHash<QStyle::SubControl, QRect> QStyleSheetStyle::titleBarLayout(const QWidget info.rule = subRule; info.offset = offsets[where]; info.where = where; - infos.append(qMove(info)); + infos.append(std::move(info)); offsets[where] += info.width; } @@ -4093,6 +4093,11 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q if (subRule.hasFont) p->setFont(subRule.font); boxCopy.rect = subRule.contentsRect(opt->rect); + if (subRule.hasImage()) { + // the image is already drawn with CE_ToolBoxTabShape, adjust rect here + const int iconExtent = proxy()->pixelMetric(QStyle::PM_SmallIconSize, box, w); + boxCopy.rect.setLeft(boxCopy.rect.left() + iconExtent); + } QWindowsStyle::drawControl(ce, &boxCopy, p , w); if (subRule.hasFont) p->setFont(oldFont); |