diff options
| author | Aleix Pol <aleixpol@kde.org> | 2015-09-21 15:06:50 (GMT) |
|---|---|---|
| committer | Aleix Pol <aleixpol@kde.org> | 2015-09-21 15:06:50 (GMT) |
| commit | 882f2fe88465295a23bfafad67d330e82c0880a4 (patch) | |
| tree | 61d61f9b3dd7f4536202114e74aaa83dbbef6503 | |
| parent | efcec90fc804456898cf1bd1572c0aff7975f50b (diff) | |
Remove the toolbar that exposes the current page settings
| -rw-r--r-- | discover/qml/Breadcrumbs.qml | 4 | ||||
| -rw-r--r-- | discover/qml/Main.qml | 40 |
2 files changed, 7 insertions, 37 deletions
diff --git a/discover/qml/Breadcrumbs.qml b/discover/qml/Breadcrumbs.qml index cbb09c3..abf9e9a 100644 --- a/discover/qml/Breadcrumbs.qml +++ b/discover/qml/Breadcrumbs.qml @@ -23,9 +23,10 @@ import QtQuick.Layouts 1.0 Item { id: bread - readonly property int count: pageStack.depth+1 + readonly property int count: pageStack.depth property StackView pageStack: null Layout.minimumHeight: theLayout.Layout.minimumHeight + Layout.preferredHeight: theLayout.Layout.preferredHeight function doClick(index) { var pos = bread.pageStack.depth @@ -47,6 +48,7 @@ Item { delegate: Button { Layout.fillHeight: true Layout.minimumWidth: height //workaround bug in the plasma style + Layout.minimumHeight: implicitHeight property var currentPage: bread.pageStack.get(modelData, false) diff --git a/discover/qml/Main.qml b/discover/qml/Main.qml index bac4734..cb35716 100644 --- a/discover/qml/Main.qml +++ b/discover/qml/Main.qml @@ -164,44 +164,12 @@ Rectangle } } - Item { + Breadcrumbs { + id: fu Layout.fillWidth: true - Layout.preferredHeight: (breadcrumbsItem.visible || pageToolBar.visible) ? toolbar.Layout.preferredHeight : 0 - - - Breadcrumbs { - id: breadcrumbsItem - - anchors { - top: parent.top - left: parent.left - bottom: parent.bottom - right: pageToolBar.left - rightMargin: pageToolBar.visible ? 10 : 0 - } - - pageStack: stackView - } + visible: count>1 - ToolBar { - id: pageToolBar - - anchors { - top: parent.top - right: parent.right - bottom: parent.bottom - } - Layout.minimumHeight: toolbarLoader.item ? toolbarLoader.item.Layout.minimumHeight : 0 - width: toolbarLoader.item ? toolbarLoader.item.width+5 : 0 - visible: width>0 - - Loader { - id: toolbarLoader - sourceComponent: stackView.currentItem ? stackView.currentItem.tools : null - } - - Behavior on width { NumberAnimation { duration: 250 } } - } + pageStack: stackView } StackView { |
