diff options
Diffstat (limited to 'plugins/Marketplace/resources/qml')
-rw-r--r-- | plugins/Marketplace/resources/qml/ManageButton.qml | 34 | ||||
-rw-r--r-- | plugins/Marketplace/resources/qml/PackageCard.qml | 2 |
2 files changed, 30 insertions, 6 deletions
diff --git a/plugins/Marketplace/resources/qml/ManageButton.qml b/plugins/Marketplace/resources/qml/ManageButton.qml index 29b8ff22a5..0b3008461b 100644 --- a/plugins/Marketplace/resources/qml/ManageButton.qml +++ b/plugins/Marketplace/resources/qml/ManageButton.qml @@ -18,8 +18,8 @@ RowLayout property string confirmedPrimaryText: confirmedMessageText.text property string confirmedSecondaryText: confirmedMessageText.text property bool enabled: true - property bool busy: state == "busy" - property bool confirmed: state == "confirmed" + property bool busy: false + property bool confirmed: false signal clicked(bool primary_action) @@ -62,7 +62,7 @@ RowLayout UM.RecolorImage { id: busyIndicator - visible: parent.visible + visible: busyMessage.visible width: height anchors.left: parent.left anchors.top: parent.top @@ -76,7 +76,7 @@ RowLayout RotationAnimator { target: busyIndicator - running: busyIndicator.visible + running: busyMessage.visible from: 0 to: 360 loops: Animation.Infinite @@ -86,7 +86,7 @@ RowLayout Label { id: busyMessageText - visible: parent.visible + visible: busyMessage.visible anchors.left: busyIndicator.right anchors.leftMargin: UM.Theme.getSize("narrow_margin").width anchors.verticalCenter: parent.verticalCenter @@ -123,6 +123,12 @@ RowLayout name: "primary" PropertyChanges { + target: manageButton + busy: false + confirmed: false + } + PropertyChanges + { target: primaryButton visible: true } @@ -147,6 +153,12 @@ RowLayout name: "secondary" PropertyChanges { + target: manageButton + busy: false + confirmed: false + } + PropertyChanges + { target: primaryButton visible: false } @@ -180,6 +192,12 @@ RowLayout name: "busy" PropertyChanges { + target: manageButton + busy: true + confirmed: false + } + PropertyChanges + { target: primaryButton visible: false } @@ -204,6 +222,12 @@ RowLayout name: "confirmed" PropertyChanges { + target: manageButton + busy: false + confirmed: true + } + PropertyChanges + { target: primaryButton visible: false } diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml index d782d43cbb..721a152b12 100644 --- a/plugins/Marketplace/resources/qml/PackageCard.qml +++ b/plugins/Marketplace/resources/qml/PackageCard.qml @@ -358,7 +358,7 @@ Rectangle busySecondaryText: catalog.i18nc("@button", "Uninstalling...") confirmedSecondaryText: catalog.i18nc("@button", "Uninstalled") enabled: !(enableManageButton.busy || updateManageButton.busy) - visible: state == "confirmed" || root.manageableInListView || root.expanded + visible: installManageButton.confirmed || root.manageableInListView || root.expanded onClicked: { |