Commit f0dc351a authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Make the sources page header a page header rather than a list header

BUG: 388745
parent ca1ac7cf
......@@ -32,6 +32,55 @@ DiscoverPage {
}
}
header: QQC2.ToolBar {
anchors {
right: parent.right
left: parent.left
}
contentItem: RowLayout {
anchors {
topMargin: Kirigami.Units.smallSpacing
bottomMargin: Kirigami.Units.smallSpacing
}
Item {
Layout.fillWidth: true
}
Repeater {
model: ActionsModel {
actions: ResourcesModel.actions
}
delegate: RowLayout {
Kirigami.Icon {
source: modelData.icon
}
visible: theAction.action && theAction.action.visible
ToolButton {
height: parent.height
action: Action {
id: theAction
readonly property QtObject action: modelData
text: action.text
onTriggered: action.trigger()
enabled: action.enabled
}
}
}
}
ToolButton {
text: i18n("Help...")
menu: Menu {
MenuItem { action: ActionBridge { action: app.action("help_about_app") } }
MenuItem { action: ActionBridge { action: app.action("help_report_bug") } }
}
}
}
}
mainItem: ListView {
id: sourcesView
model: QSortFilterProxyModel{
......@@ -104,57 +153,6 @@ DiscoverPage {
}
}
headerPositioning: ListView.OverlayHeader
header: QQC2.ToolBar {
anchors {
right: parent.right
left: parent.left
}
contentItem: RowLayout {
anchors {
topMargin: Kirigami.Units.smallSpacing
bottomMargin: Kirigami.Units.smallSpacing
}
Item {
Layout.fillWidth: true
}
Repeater {
model: ActionsModel {
actions: ResourcesModel.actions
}
delegate: RowLayout {
Kirigami.Icon {
source: modelData.icon
}
visible: theAction.action && theAction.action.visible
ToolButton {
height: parent.height
action: Action {
id: theAction
readonly property QtObject action: modelData
text: action.text
onTriggered: action.trigger()
enabled: action.enabled
}
}
}
}
ToolButton {
text: i18n("Help...")
menu: Menu {
MenuItem { action: ActionBridge { action: app.action("help_about_app") } }
MenuItem { action: ActionBridge { action: app.action("help_report_bug") } }
}
}
}
}
delegate: Kirigami.SwipeListItem {
Layout.fillWidth: true
enabled: display.length>0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment