diff options
| -rw-r--r-- | src/controls/Private/TreeViewItemDelegateLoader.qml | 1 | ||||
| -rw-r--r-- | src/controls/Styles/Desktop/TableViewStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Desktop/TreeViewStyle.qml | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/controls/Private/TreeViewItemDelegateLoader.qml b/src/controls/Private/TreeViewItemDelegateLoader.qml index c4e13729c..8b8801fc9 100644 --- a/src/controls/Private/TreeViewItemDelegateLoader.qml +++ b/src/controls/Private/TreeViewItemDelegateLoader.qml @@ -98,6 +98,7 @@ TableViewItemDelegateLoader { visible: itemDelegateLoader.width > __itemIndentation sourceComponent: __style && __style.__branchDelegate || null anchors.right: parent.item ? parent.item.left : undefined + anchors.rightMargin: __style.__indentation > width ? (__style.__indentation - width) / 2 : 0 anchors.verticalCenter: parent.verticalCenter property QtObject styleData: itemDelegateLoader.styleData onLoaded: if (__rowItem) __rowItem.branchDecoration = item diff --git a/src/controls/Styles/Desktop/TableViewStyle.qml b/src/controls/Styles/Desktop/TableViewStyle.qml index f5199f3ff..88f41d7f5 100644 --- a/src/controls/Styles/Desktop/TableViewStyle.qml +++ b/src/controls/Styles/Desktop/TableViewStyle.qml @@ -96,7 +96,7 @@ ScrollViewStyle { font: __styleitem.font anchors.left: parent.left anchors.right: parent.right - anchors.leftMargin: styleData["depth"] && styleData.column === 0 ? 0 : 8 + anchors.leftMargin: styleData.hasOwnProperty("depth") && styleData.column === 0 ? 0 : 8 horizontalAlignment: styleData.textAlignment anchors.verticalCenter: parent.verticalCenter elide: styleData.elideMode diff --git a/src/controls/Styles/Desktop/TreeViewStyle.qml b/src/controls/Styles/Desktop/TreeViewStyle.qml index 1901c40cc..6424ed0e1 100644 --- a/src/controls/Styles/Desktop/TreeViewStyle.qml +++ b/src/controls/Styles/Desktop/TreeViewStyle.qml @@ -56,12 +56,12 @@ Desktop.TableViewStyle { hasFocus: __styleitem.active Component.onCompleted: { - implicitWidth = si.pixelMetric("treeviewindentation") + root.__indentation = si.pixelMetric("treeviewindentation") + implicitWidth = root.__indentation implicitHeight = implicitWidth var rect = si.subControlRect("dummy"); width = rect.width height = rect.height - root.__indentation = width } } } |
