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>
This commit is contained in:
parent
42507173bd
commit
55cf7c577d
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user