add click for text stack hlayout vlayout
This commit is contained in:
@@ -27,7 +27,7 @@ void DoricGroupNode::configChildNode() {
|
||||
if (mType.isEmpty() || mType == "Stack") {
|
||||
parent = mView;
|
||||
} else {
|
||||
parent = mView->childItems().at(0);
|
||||
parent = mView->childItems().at(1);
|
||||
}
|
||||
for (int idx = 0; idx < mChildViewIds.size(); idx++) {
|
||||
QString id = mChildViewIds.at(idx);
|
||||
|
@@ -11,14 +11,15 @@ QQuickItem *DoricHLayoutNode::build() {
|
||||
}
|
||||
|
||||
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
|
||||
item->setProperty("wrapper", (qint64)this);
|
||||
return item;
|
||||
}
|
||||
|
||||
void DoricHLayoutNode::blend(QQuickItem *view, QString name, QJSValue prop) {
|
||||
if (name == "space") {
|
||||
view->childItems().at(0)->setProperty("spacing", prop.toInt());
|
||||
view->childItems().at(1)->setProperty("spacing", prop.toInt());
|
||||
} else if (name == "gravity") {
|
||||
view->childItems().at(0)->setProperty("gravity", prop.toInt());
|
||||
view->childItems().at(1)->setProperty("gravity", prop.toInt());
|
||||
} else {
|
||||
DoricGroupNode::blend(view, name, prop);
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ QQuickItem *DoricStackNode::build() {
|
||||
}
|
||||
|
||||
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
|
||||
item->setProperty("wrapper", (qint64)this);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,7 @@ QQuickItem *DoricTextNode::build() {
|
||||
}
|
||||
|
||||
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
|
||||
item->setProperty("wrapper", (qint64)this);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
@@ -11,14 +11,15 @@ QQuickItem *DoricVLayoutNode::build() {
|
||||
}
|
||||
|
||||
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
|
||||
item->setProperty("wrapper", (qint64)this);
|
||||
return item;
|
||||
}
|
||||
|
||||
void DoricVLayoutNode::blend(QQuickItem *view, QString name, QJSValue prop) {
|
||||
if (name == "space") {
|
||||
view->childItems().at(0)->setProperty("spacing", prop.toInt());
|
||||
view->childItems().at(1)->setProperty("spacing", prop.toInt());
|
||||
} else if (name == "gravity") {
|
||||
view->childItems().at(0)->setProperty("gravity", prop.toInt());
|
||||
view->childItems().at(1)->setProperty("gravity", prop.toInt());
|
||||
} else {
|
||||
DoricGroupNode::blend(view, name, prop);
|
||||
}
|
||||
|
Reference in New Issue
Block a user