Commit 37e166ae authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Remove unnecessary complexity in InstallApplicationButton

parent c62613f1
......@@ -13,7 +13,6 @@ ConditionalLoader
readonly property alias listener: listener
readonly property string text: !application.isInstalled ? i18n("Install") : i18n("Remove")
property Component additionalItem: null
property bool flat: false
TransactionListener {
id: listener
......@@ -56,25 +55,11 @@ ConditionalLoader
}
}
Component {
id: flatButton
ToolButton {
enabled: application.state != AbstractResource.Broken
text: root.text
onClicked: root.click()
}
}
Component {
id: fullButton
Button {
enabled: application.state != AbstractResource.Broken
text: root.text
componentFalse: Button {
enabled: application.state != AbstractResource.Broken
text: root.text
focus: true
onClicked: root.click()
}
onClicked: root.click()
}
componentFalse: root.flat ? flatButton : fullButton
}
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