layout bug fix
This commit is contained in:
parent
4c427fc257
commit
af1ef2a103
@ -112,10 +112,13 @@ QSizeF DoricScrollerNode::sizeThatFits(QSizeF size) {
|
||||
DoricLayouts *layout = (DoricLayouts *)mChildNode->getNodeView()
|
||||
->property("doricLayout")
|
||||
.toULongLong();
|
||||
layout->apply(size);
|
||||
|
||||
return QSizeF(qMin(size.width(), layout->getMeasuredWidth()),
|
||||
qMin(size.height(), layout->getMeasuredHeight()));
|
||||
if (layout->getResolved()) {
|
||||
layout->apply(size);
|
||||
}
|
||||
|
||||
return QSizeF(qMax(size.width(), layout->getMeasuredWidth()),
|
||||
qMax(size.height(), layout->getMeasuredHeight()));
|
||||
}
|
||||
|
||||
DoricViewNode *DoricScrollerNode::getSubNodeById(QString id) {
|
||||
|
@ -751,3 +751,5 @@ void DoricLayouts::setMeasuredY(qreal measuredY) {
|
||||
qCritical() << "DoricLayouts: " << tag << this->view->property("uuid")
|
||||
<< " measuredY: " << this->measuredY;
|
||||
}
|
||||
|
||||
bool DoricLayouts::getResolved() { return resolved; }
|
||||
|
@ -93,6 +93,8 @@ public:
|
||||
qreal getMeasuredWidth();
|
||||
qreal getMeasuredHeight();
|
||||
|
||||
bool getResolved();
|
||||
|
||||
private:
|
||||
QString tag;
|
||||
|
||||
|
Reference in New Issue
Block a user