Commit 29a1228f authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Adopt cards for the application delegate

parent 609aa67e
......@@ -25,13 +25,14 @@ import org.kde.kquickcontrolsaddons 2.0
import QtQuick.Window 2.1
import org.kde.kcoreaddons 1.0
import "navigation.js" as Navigation
import org.kde.kirigami 2.0 as Kirigami
import org.kde.kirigami 2.4 as Kirigami
Kirigami.AbstractListItem
Kirigami.AbstractCard
{
id: delegateArea
property alias application: installButton.application
property bool compact: false
showClickFeedback: true
function trigger() {
if (ListView.view)
......@@ -42,9 +43,8 @@ Kirigami.AbstractListItem
Keys.onReturnPressed: trigger()
onClicked: trigger()
rightPadding: Kirigami.Units.largeSpacing
backgroundColor: Kirigami.Theme.viewBackgroundColor
Item {
header: Item {
implicitHeight: Math.max(conts.implicitHeight, resourceIcon.height)
Kirigami.Icon {
......
......@@ -25,7 +25,7 @@ import QtQuick.Window 2.2
import "navigation.js" as Navigation
import org.kde.discover.app 1.0
import org.kde.discover 2.0
import org.kde.kirigami 2.0 as Kirigami
import org.kde.kirigami 2.4 as Kirigami
DiscoverPage {
id: page
......@@ -109,14 +109,9 @@ DiscoverPage {
}
]
ListView {
Kirigami.CardsListView {
id: apps
anchors {
top: parent.top
topMargin: Kirigami.Units.gridUnit
}
section.delegate: QQC2.Label {
text: section
anchors {
......@@ -132,7 +127,6 @@ DiscoverPage {
apps.currentIndex = -1
}
}
spacing: Kirigami.Units.gridUnit
currentIndex: -1
delegate: ApplicationDelegate {
x: Kirigami.Units.gridUnit
......
......@@ -25,7 +25,7 @@ import org.kde.kquickcontrolsaddons 2.0
import org.kde.discover 2.0
import org.kde.discover.app 1.0
import "navigation.js" as Navigation
import org.kde.kirigami 2.1 as Kirigami
import org.kde.kirigami 2.4 as Kirigami
DiscoverPage
{
......@@ -48,15 +48,8 @@ DiscoverPage
readonly property bool compact: page.width < 500 || !applicationWindow().wideScreen
ListView {
id: browsingView
anchors {
top: parent.top
topMargin: Kirigami.Units.gridUnit
}
Kirigami.CardsListView {
model: FeaturedModel {}
spacing: Kirigami.Units.gridUnit
currentIndex: -1
delegate: ApplicationDelegate {
x: Kirigami.Units.gridUnit
......
Supports Markdown
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