[Dialog] Use setPosition / setSize instead of setting everything individually
Reduces the amount of unneccessary layouting done. Differential Revision: https://phabricator.kde.org/D4009
This commit is contained in:
parent
4479fdab7f
commit
4b55493568
|
@ -648,10 +648,9 @@ void DialogPrivate::slotWindowPositionChanged()
|
|||
|
||||
if (mainItem) {
|
||||
auto margin = frameSvgItem->fixedMargins();
|
||||
mainItem->setX(margin->left());
|
||||
mainItem->setY(margin->top());
|
||||
mainItem->setWidth(q->width() - margin->left() - margin->right());
|
||||
mainItem->setHeight(q->height() - margin->top() - margin->bottom());
|
||||
mainItem->setPosition(QPoint(margin->left(), margin->top()));
|
||||
mainItem->setSize(QSize(q->width() - margin->left() - margin->right(),
|
||||
q->height() - margin->top() - margin->bottom()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user