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

Include a compact state for the InstallApplicationButton

Enable it when the window is small so that the window isn't full of
install buttons like is the case on the phone right now.
parent 4039a262
......@@ -96,6 +96,7 @@ Kirigami.AbstractCard
id: installButton
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
Layout.rowSpan: delegateArea.compact ? 3 : 1
compact: delegateArea.compact
}
RowLayout {
......
......@@ -153,7 +153,7 @@ DiscoverPage {
currentIndex: -1
delegate: ApplicationDelegate {
application: model.application
compact: page.compact
compact: !applicationWindow().wideScreen
showRating: page.showRating
}
......
......@@ -14,6 +14,8 @@ ConditionalLoader
readonly property string text: !application.isInstalled ? i18n("Install") : i18n("Remove")
property Component additionalItem: null
property bool compact: false
TransactionListener {
id: listener
}
......@@ -65,7 +67,8 @@ ConditionalLoader
componentFalse: Button {
enabled: application.state !== AbstractResource.Broken
text: root.text
text: compact ? "" : root.text
icon.name: compact ? root.action.icon.name : ""
focus: true
onClicked: root.click()
......
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