diff --git a/doric-Qt/doric/resources/hlayout.qml b/doric-Qt/doric/resources/hlayout.qml index 315b21cc..9c9d51c6 100644 --- a/doric-Qt/doric/resources/hlayout.qml +++ b/doric-Qt/doric/resources/hlayout.qml @@ -6,7 +6,7 @@ import "util.mjs" as Util import "gravity.mjs" as Gravity Rectangle { - property int wrapper: 0 + property var wrapper clip: true @@ -19,15 +19,15 @@ Rectangle { property int childrenRectWidth: childrenRect.width property int childrenRectHeight: childrenRect.height - onWidthChanged: () => { + onWidthChanged: { console.log(tag, uuid + " onWidthChanged: " + this.width) } - onHeightChanged: () => { + onHeightChanged: { console.log(tag, uuid + " onHeightChanged: " + this.height) } - onWidthSpecChanged: () => { + onWidthSpecChanged: { console.log(tag, uuid + " onWidthSpecChanged: " + this.widthSpec) console.log(tag, uuid + " parent width: " + parent.width) @@ -37,7 +37,7 @@ Rectangle { } } - onHeightSpecChanged: () => { + onHeightSpecChanged: { console.log(tag, uuid + " onHeightSpecChanged: " + this.heightSpec) console.log(tag, uuid + " parent height: " + parent.height) @@ -47,7 +47,7 @@ Rectangle { } } - onChildrenRectChanged: () => { + onChildrenRectChanged: { console.log(tag, uuid + " widthSpec: " + widthSpec + " heightSpec: " + heightSpec) console.log(tag, uuid + " onChildrenRectChanged: " + childrenRect) this.childrenRectWidth = childrenRect.width @@ -67,6 +67,7 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { + console.log(tag, uuid + " wrapper: " + wrapper) mouseAreaBridge.onClick(wrapper) } } @@ -76,7 +77,7 @@ Rectangle { spacing: 0 - onChildrenChanged: () => { + onChildrenChanged: { console.log(tag, uuid + " gravity: " + gravity) for (var i = 0;i !== children.length;i++) { switch(this.gravity) { diff --git a/doric-Qt/doric/resources/stack.qml b/doric-Qt/doric/resources/stack.qml index 53a39296..4d9e2e25 100644 --- a/doric-Qt/doric/resources/stack.qml +++ b/doric-Qt/doric/resources/stack.qml @@ -5,7 +5,7 @@ import QtQuick.Layouts 1.15 import "util.mjs" as Util Rectangle { - property int wrapper: 0 + property var wrapper clip: true @@ -18,15 +18,15 @@ Rectangle { property var tag: "Stack" - onWidthChanged: () => { + onWidthChanged: { console.log(tag, uuid + " onWidthChanged: " + this.width) } - onHeightChanged: () => { + onHeightChanged: { console.log(tag, uuid + " onHeightChanged: " + this.height) } - onWidthSpecChanged: () => { + onWidthSpecChanged: { console.log(tag, uuid + " onWidthSpecChanged: " + this.widthSpec) console.log(tag, uuid + " parent width: " + parent.width) if (this.widthSpec === 2) { @@ -34,7 +34,7 @@ Rectangle { } } - onHeightSpecChanged: () => { + onHeightSpecChanged: { console.log(tag, uuid + " onHeightSpecChanged: " + this.heightSpec) console.log(tag, uuid + " parent height: " + parent.height) @@ -43,7 +43,7 @@ Rectangle { } } - onChildrenRectChanged: () => { + onChildrenRectChanged: { console.log(tag, uuid + " widthSpec: " + widthSpec + " heightSpec: " + heightSpec) console.log(tag, uuid + " onChildrenRectChanged: " + childrenRect) this.childrenRectWidth = childrenRect.width @@ -63,6 +63,7 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { + console.log(tag, uuid + " wrapper: " + wrapper) mouseAreaBridge.onClick(wrapper) } } diff --git a/doric-Qt/doric/resources/text.qml b/doric-Qt/doric/resources/text.qml index f21b46a8..e3b3bc0b 100644 --- a/doric-Qt/doric/resources/text.qml +++ b/doric-Qt/doric/resources/text.qml @@ -14,15 +14,15 @@ Rectangle { property var tag: "Text" - onWidthChanged: () => { + onWidthChanged: { console.log(tag, uuid + " onWidthChanged: " + this.width) } - onHeightChanged: () => { + onHeightChanged: { console.log(tag, uuid + " onHeightChanged: " + this.height) } - onChildrenRectChanged: () => { + onChildrenRectChanged: { console.log(tag, uuid + " onChildrenRectChanged: " + childrenRect) this.childrenRectWidth = childrenRect.width this.childrenRectHeight = childrenRect.height @@ -54,6 +54,7 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { + console.log(tag, uuid + " wrapper: " + wrapper) mouseAreaBridge.onClick(wrapper) } } diff --git a/doric-Qt/doric/resources/vlayout.qml b/doric-Qt/doric/resources/vlayout.qml index 692bfd44..225557ab 100644 --- a/doric-Qt/doric/resources/vlayout.qml +++ b/doric-Qt/doric/resources/vlayout.qml @@ -6,7 +6,7 @@ import "util.mjs" as Util import "gravity.mjs" as Gravity Rectangle { - property int wrapper: 0 + property var wrapper clip: true @@ -19,15 +19,15 @@ Rectangle { property int childrenRectWidth: childrenRect.width property int childrenRectHeight: childrenRect.height - onWidthChanged: () => { + onWidthChanged: { console.log(tag, uuid + " onWidthChanged: " + this.width) } - onHeightChanged: () => { + onHeightChanged: { console.log(tag, uuid + " onHeightChanged: " + this.height) } - onWidthSpecChanged: () => { + onWidthSpecChanged: { console.log(tag, uuid + " onWidthSpecChanged: " + this.widthSpec) console.log(tag, uuid + " parent width: " + parent.width) @@ -37,7 +37,7 @@ Rectangle { } } - onHeightSpecChanged: () => { + onHeightSpecChanged: { console.log(tag, uuid + " onHeightSpecChanged: " + this.heightSpec) console.log(tag, uuid + " parent height: " + parent.height) @@ -47,7 +47,7 @@ Rectangle { } } - onChildrenRectChanged: () => { + onChildrenRectChanged: { console.log(tag, uuid + " widthSpec: " + widthSpec + " heightSpec: " + heightSpec) console.log(tag, uuid + " onChildrenRectChanged: " + childrenRect) this.childrenRectWidth = childrenRect.width @@ -67,6 +67,7 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { + console.log(tag, uuid + " wrapper: " + wrapper) mouseAreaBridge.onClick(wrapper) } } @@ -76,7 +77,7 @@ Rectangle { spacing: 0 - onChildrenChanged: () => { + onChildrenChanged: { console.log(tag, uuid + " gravity: " + gravity) for (var i = 0;i !== children.length;i++) { diff --git a/doric-Qt/doric/shader/DoricViewNode.cpp b/doric-Qt/doric/shader/DoricViewNode.cpp index f092d13b..b23d81f5 100644 --- a/doric-Qt/doric/shader/DoricViewNode.cpp +++ b/doric-Qt/doric/shader/DoricViewNode.cpp @@ -118,7 +118,7 @@ void DoricViewNode::blend(QQuickItem *view, QString name, QJsonValue prop) { } else if (name == "onClick") { if (prop.isString()) clickFunction = prop.toString(); - } else { + } else if (name != "layoutConfig") { qCritical() << name << ": " << prop.toString(); } }