diff options
| author | Aleix Pol <aleixpol@kde.org> | 2015-09-21 16:32:20 (GMT) |
|---|---|---|
| committer | Aleix Pol <aleixpol@kde.org> | 2015-09-21 16:32:20 (GMT) |
| commit | 9bacab195e4c7c17798838b899f7b7aee232cfc2 (patch) | |
| tree | 38bb1198e804ceba77d7c84125240c904bac1cf4 | |
| parent | c2112bdf63a57fa78916e7033f3d5c7c39437846 (diff) | |
Adopt the header on the sources page, from the updates
Let's see if we can reuse it further...
| -rw-r--r-- | discover/qml/SourcesPage.qml | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/discover/qml/SourcesPage.qml b/discover/qml/SourcesPage.qml index f6837a8..18d3c2b 100644 --- a/discover/qml/SourcesPage.qml +++ b/discover/qml/SourcesPage.qml @@ -16,36 +16,6 @@ Item { id: sourcesMenu } - property Component tools: RowLayout { - Layout.fillWidth: true - visible: page.visible - ToolButton { - iconName: "list-add" - text: i18n("Add Source") - - tooltip: text - menu: sourcesMenu - } - Repeater { - model: SourcesModel.actions - - delegate: RowLayout{ - QIconItem { - icon: modelData.icon - } - ToolButton { - height: parent.height - action: Action { - property QtObject action: modelData - text: action.text - onTriggered: action.trigger() - enabled: action.enabled - } - } - } - } - } - ScrollView { anchors.fill: parent ListView { @@ -54,6 +24,40 @@ Item { model: SourcesModel + header: GridItem { + height: 50 + x: page.proposedMargin + width: app.actualWidth + RowLayout { + anchors.verticalCenter: parent.verticalCenter + ToolButton { + iconName: "list-add" + text: i18n("Add Source") + + tooltip: text + menu: sourcesMenu + } + Repeater { + model: SourcesModel.actions + + delegate: RowLayout{ + QIconItem { + icon: modelData.icon + } + ToolButton { + height: parent.height + action: Action { + property QtObject action: modelData + text: action.text + onTriggered: action.trigger() + enabled: action.enabled + } + } + } + } + } + } + delegate: ColumnLayout { id: sourceDelegate x: page.proposedMargin |
