diff options
Diffstat (limited to 'widgets')
| -rw-r--r-- | widgets/Box.qml | 10 | ||||
| -rw-r--r-- | widgets/BoxLayout.qml | 12 | ||||
| -rw-r--r-- | widgets/ClippingBox.qml | 10 | ||||
| -rw-r--r-- | widgets/ClippingBoxLayout.qml | 12 |
4 files changed, 22 insertions, 22 deletions
diff --git a/widgets/Box.qml b/widgets/Box.qml index 536469e..d93fb69 100644 --- a/widgets/Box.qml +++ b/widgets/Box.qml @@ -17,11 +17,6 @@ Rectangle { readonly property int paddingX: getRealPadding().x readonly property int paddingY: getRealPadding().y - color: "transparent" - - implicitWidth: childrenRect.width + paddingX - implicitHeight: childrenRect.height + paddingY - function getRealPadding() { const pad = {}; @@ -49,6 +44,11 @@ Rectangle { return pad; } + color: "transparent" + + implicitWidth: childrenRect.width + paddingX + implicitHeight: childrenRect.height + paddingY + onChildrenChanged: { for (const child of children) { child.x = Qt.binding(() => paddingLeft); diff --git a/widgets/BoxLayout.qml b/widgets/BoxLayout.qml index 12aa4f7..da68409 100644 --- a/widgets/BoxLayout.qml +++ b/widgets/BoxLayout.qml @@ -5,6 +5,8 @@ import QtQuick.Layouts Rectangle { id: root + default property alias children: layout.children + property bool vertical: false property bool homogenous: false property bool animated: false @@ -18,11 +20,6 @@ Rectangle { readonly property int paddingX: getRealPadding().x readonly property int paddingY: getRealPadding().y - color: "transparent" - - implicitWidth: layout.implicitWidth + paddingX - implicitHeight: layout.implicitHeight + paddingY - function getRealPadding() { const pad = {}; @@ -50,7 +47,10 @@ Rectangle { return pad; } - default property alias children: layout.children + color: "transparent" + + implicitWidth: layout.implicitWidth + paddingX + implicitHeight: layout.implicitHeight + paddingY GridLayout { id: layout diff --git a/widgets/ClippingBox.qml b/widgets/ClippingBox.qml index 1ced873..d0c9b92 100644 --- a/widgets/ClippingBox.qml +++ b/widgets/ClippingBox.qml @@ -18,11 +18,6 @@ ClippingRectangle { readonly property int paddingX: getRealPadding().x readonly property int paddingY: getRealPadding().y - color: "transparent" - - implicitWidth: childrenRect.width + paddingX - implicitHeight: childrenRect.height + paddingY - function getRealPadding() { const pad = {}; @@ -50,6 +45,11 @@ ClippingRectangle { return pad; } + color: "transparent" + + implicitWidth: childrenRect.width + paddingX + implicitHeight: childrenRect.height + paddingY + onChildrenChanged: { for (const child of children) { child.x = Qt.binding(() => paddingLeft); diff --git a/widgets/ClippingBoxLayout.qml b/widgets/ClippingBoxLayout.qml index 2b22c8c..e96554c 100644 --- a/widgets/ClippingBoxLayout.qml +++ b/widgets/ClippingBoxLayout.qml @@ -6,6 +6,8 @@ import QtQuick.Layouts ClippingRectangle { id: root + default property alias children: layout.children + property bool vertical: false property bool homogenous: false property bool animated: false @@ -19,11 +21,6 @@ ClippingRectangle { readonly property int paddingX: getRealPadding().x readonly property int paddingY: getRealPadding().y - color: "transparent" - - implicitWidth: layout.implicitWidth + paddingX - implicitHeight: layout.implicitHeight + paddingY - function getRealPadding() { const pad = {}; @@ -51,7 +48,10 @@ ClippingRectangle { return pad; } - default property alias children: layout.children + color: "transparent" + + implicitWidth: layout.implicitWidth + paddingX + implicitHeight: layout.implicitHeight + paddingY GridLayout { id: layout |