Reset button if user declines license

Contributes to: CURA-8587
This commit is contained in:
Jelle Spijker 2021-12-07 15:06:46 +01:00
parent 5b3e9079ed
commit bb9696c39f
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
4 changed files with 73 additions and 40 deletions

View file

@ -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
@ -122,6 +122,12 @@ RowLayout
{
name: "primary"
PropertyChanges
{
target: manageButton
busy: false
confirmed: false
}
PropertyChanges
{
target: primaryButton
visible: true
@ -146,6 +152,12 @@ RowLayout
{
name: "secondary"
PropertyChanges
{
target: manageButton
busy: false
confirmed: false
}
PropertyChanges
{
target: primaryButton
visible: false
@ -179,6 +191,12 @@ RowLayout
{
name: "busy"
PropertyChanges
{
target: manageButton
busy: true
confirmed: false
}
PropertyChanges
{
target: primaryButton
visible: false
@ -203,6 +221,12 @@ RowLayout
{
name: "confirmed"
PropertyChanges
{
target: manageButton
busy: false
confirmed: true
}
PropertyChanges
{
target: primaryButton
visible: false

View file

@ -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:
{