From 3d97a3b4beadf3304c732e66e44d561b08e6bbe5 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 19 Jul 2017 22:50:39 +0200 Subject: Anchor the treeview properly --- framework/qml/InlineAccountSwitcher.qml | 5 ++++- framework/qml/TreeView.qml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'framework/qml') diff --git a/framework/qml/InlineAccountSwitcher.qml b/framework/qml/InlineAccountSwitcher.qml index c62cab7d..a9ef95f9 100644 --- a/framework/qml/InlineAccountSwitcher.qml +++ b/framework/qml/InlineAccountSwitcher.qml @@ -47,8 +47,11 @@ FocusScope { property variant currentData: model property bool isCurrent: (model.accountId == root.currentAccount) + anchors { + left: layout.left + right: layout.right + } height: Kube.Units.gridUnit - width: root.width Layout.fillHeight: isCurrent Rectangle { diff --git a/framework/qml/TreeView.qml b/framework/qml/TreeView.qml index 7abfe271..445ad673 100644 --- a/framework/qml/TreeView.qml +++ b/framework/qml/TreeView.qml @@ -38,7 +38,7 @@ Flickable { Controls2.ScrollBar.vertical: Controls2.ScrollBar {} clip: true - contentWidth: treeView.width + contentWidth: root.width contentHeight: treeView.implicitHeight Kube.ScrollHelper { id: scrollHelper @@ -150,8 +150,10 @@ Flickable { anchors { verticalCenter: parent.verticalCenter left: parent.left + right: parent.right } text: styleData.value + elide: Qt.ElideRight color: Kube.Colors.viewBackgroundColor } } -- cgit v1.2.3