Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/ApplicationDelegate.qml
Show All 38 Lines | 38 | if (ListView.view) | |||
---|---|---|---|---|---|
39 | ListView.view.currentIndex = index | 39 | ListView.view.currentIndex = index | ||
40 | Navigation.openApplication(application) | 40 | Navigation.openApplication(application) | ||
41 | } | 41 | } | ||
42 | highlighted: ListView.isCurrentItem | 42 | highlighted: ListView.isCurrentItem | ||
43 | Keys.onReturnPressed: trigger() | 43 | Keys.onReturnPressed: trigger() | ||
44 | onClicked: trigger() | 44 | onClicked: trigger() | ||
45 | 45 | | |||
46 | contentItem: Item { | 46 | contentItem: Item { | ||
47 | implicitHeight: Math.max(conts.implicitHeight, resourceIcon.height) | 47 | implicitHeight: delegateArea.compact ? Kirigami.Units.gridUnit * 2 : Kirigami.Units.gridUnit * 4 | ||
48 | 48 | | |||
49 | Kirigami.Icon { | 49 | Kirigami.Icon { | ||
50 | id: resourceIcon | 50 | id: resourceIcon | ||
51 | source: application.icon | 51 | source: application.icon | ||
52 | readonly property real contHeight: delegateArea.compact ? Kirigami.Units.gridUnit * 3 : Kirigami.Units.gridUnit * 5 | 52 | readonly property real contHeight: delegateArea.compact ? Kirigami.Units.gridUnit * 3 : Kirigami.Units.gridUnit * 5 | ||
53 | height: contHeight | 53 | height: contHeight | ||
54 | width: contHeight | 54 | width: contHeight | ||
55 | anchors { | 55 | anchors { | ||
56 | verticalCenter: parent.verticalCenter | 56 | verticalCenter: parent.verticalCenter | ||
57 | left: parent.left | 57 | left: parent.left | ||
58 | } | 58 | } | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | ColumnLayout { | 61 | ColumnLayout { | ||
62 | id: conts | 62 | spacing: delegateArea.compact ? 3 : 5 | ||
63 | spacing: delegateArea.compact ? 0 : 5 | | |||
64 | anchors { | 63 | anchors { | ||
65 | right: parent.right | 64 | right: parent.right | ||
66 | left: resourceIcon.right | 65 | left: resourceIcon.right | ||
67 | leftMargin: Kirigami.Units.largeSpacing | 66 | leftMargin: Kirigami.Units.largeSpacing | ||
68 | } | 67 | } | ||
69 | 68 | | |||
70 | Kirigami.Heading { | 69 | Kirigami.Heading { | ||
71 | id: head | 70 | id: head | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |