Merge branch 'CURA-8587_disable_update_install_and_uninstall' into cura-8587_disable_update_install_and_update/licence_agreement

This commit is contained in:
casper 2021-12-06 17:10:27 +01:00
commit a0bb1eda94
4 changed files with 27 additions and 14 deletions

View file

@ -28,6 +28,7 @@ RowLayout
onClicked:
{
busyMessageText.text = manageButton.busyPrimaryText
manageButton.clicked(true)
}
}
@ -40,6 +41,7 @@ RowLayout
onClicked:
{
busyMessageText.text = manageButton.busySecondaryText
manageButton.clicked(false)
}
}
@ -51,21 +53,24 @@ RowLayout
height: UM.Theme.getSize("action_button").height
width: childrenRect.width
BusyIndicator
UM.RecolorImage
{
id: busyIndicator
visible: parent.visible
width: height
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: UM.Theme.getSize("narrow_margin").height
anchors.bottom: parent.bottom
anchors.bottomMargin: anchors.topMargin
palette.dark: UM.Theme.getColor("text")
source: UM.Theme.getIcon("Spinner")
color: UM.Theme.getColor("primary")
RotationAnimator
{
target: busyIndicator.contentItem
running: busyIndicator.visible && busyIndicator.running
target: busyIndicator
running: busyIndicator.visible
from: 0
to: 360
loops: Animation.Infinite
@ -76,12 +81,12 @@ RowLayout
{
id: busyMessageText
visible: parent.visible
text: manageButton.state == "primary" ? manageButton.busyPrimaryText : manageButton.busySecondaryText
anchors.left: busyIndicator.right
anchors.leftMargin: UM.Theme.getSize("narrow_margin").width
anchors.verticalCenter: parent.verticalCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("primary")
}
}

View file

@ -232,7 +232,7 @@ Window
{
height: quitButton.height + 2 * UM.Theme.getSize("default_margin").width
color: UM.Theme.getColor("primary")
visible: false // TODO: enable this when restart is required
visible: CuraApplication.getPackageManager().hasPackagesToRemoveOrInstall
anchors
{
left: parent.left
@ -270,7 +270,12 @@ Window
Cura.SecondaryButton
{
id: quitButton
text: catalog.i18nc("@button", "Quit Ultimaker Cura")
text: catalog.i18nc("@info:button, %1 is the application name", "Quit %1").arg(CuraApplication.applicationDisplayName)
onClicked:
{
marketplaceDialog.hide();
CuraApplication.closeApplication();
}
}
}
}

View file

@ -239,7 +239,7 @@ Rectangle
{
id: readMoreButton
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottom: descriptionLabel.bottom
height: fontMetrics.height //Height of a single line.
text: catalog.i18nc("@info", "Read more")
@ -324,9 +324,9 @@ Rectangle
state: packageData.stateManageEnableButton
Layout.alignment: Qt.AlignTop
primaryText: catalog.i18nc("@button", "Enable")
busyPrimaryText: catalog.i18nc("@button", "enabling...")
busyPrimaryText: catalog.i18nc("@button", "Inabling...")
secondaryText: catalog.i18nc("@button", "Disable")
busySecondaryText: catalog.i18nc("@button", "disabling...")
busySecondaryText: catalog.i18nc("@button", "Disabling...")
enabled: !(installManageButton.busy || updateManageButton.busy)
onClicked: {
@ -347,9 +347,9 @@ Rectangle
state: packageData.stateManageInstallButton
Layout.alignment: Qt.AlignTop
primaryText: catalog.i18nc("@button", "Install")
busyPrimaryText: catalog.i18nc("@button", "installing...")
busyPrimaryText: catalog.i18nc("@button", "Installing...")
secondaryText: catalog.i18nc("@button", "Uninstall")
busySecondaryText: catalog.i18nc("@button", "uninstalling...")
busySecondaryText: catalog.i18nc("@button", "Uninstalling...")
enabled: !(enableManageButton.busy || updateManageButton.busy)
onClicked:
{