resize the framesvg to the proper size

This commit is contained in:
Marco Martin 2014-05-13 19:41:09 +02:00
parent 2bd7101314
commit f5369d6349

View File

@ -369,11 +369,6 @@ void DialogPrivate::syncToMainItemSize()
return;
}
frameSvgItem->setX(0);
frameSvgItem->setY(0);
frameSvgItem->setWidth(q->width());
frameSvgItem->setHeight(q->height());
const QSize s = QSize(mainItem.data()->width(), mainItem.data()->height()) +
QSize(frameSvgItem->margins()->left() + frameSvgItem->margins()->right(),
frameSvgItem->margins()->top() + frameSvgItem->margins()->bottom());
@ -388,6 +383,12 @@ void DialogPrivate::syncToMainItemSize()
} else {
q->resize(s);
}
frameSvgItem->setX(0);
frameSvgItem->setY(0);
frameSvgItem->setWidth(s.width());
frameSvgItem->setHeight(s.height());
syncBorders();
mainItem.data()->setX(frameSvgItem->margins()->left());
mainItem.data()->setY(frameSvgItem->margins()->top());