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