summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-02-27 17:21:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-28 15:24:56 +0100
commit55cf7c577da015bd6d48a034902477b83cf73be7 (patch)
tree998c04d61375dd855d15fcdcd071c98bb811002e /src
parent42507173bd985d8b3875d9fd0141a1dd7ad4e544 (diff)
Fix QCommonStyle::drawControl(CE_ShapedFrame) for QFrame::H/VLine
Respect QStyleOption::rect, do not expect Y to be 0. Task-number: QTBUG-29926 Change-Id: I6304d20f629f89774c897d2c81c2c7816dff4718 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index d1d80f5af0..4b6ba17595 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -2265,11 +2265,11 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
case QFrame::VLine: {
QPoint p1, p2;
if (frameShape == QFrame::HLine) {
- p1 = QPoint(opt->rect.x(), opt->rect.height() / 2);
+ p1 = QPoint(opt->rect.x(), opt->rect.y() + opt->rect.height() / 2);
p2 = QPoint(opt->rect.x() + opt->rect.width(), p1.y());
} else {
- p1 = QPoint(opt->rect.x()+opt->rect.width() / 2, 0);
- p2 = QPoint(p1.x(), opt->rect.height());
+ p1 = QPoint(opt->rect.x() + opt->rect.width() / 2, opt->rect.y());
+ p2 = QPoint(p1.x(), p1.y() + opt->rect.height());
}
if (frameShadow == QFrame::Plain) {
QPen oldPen = p->pen();