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

View File

@ -232,7 +232,7 @@ Window
{ {
height: quitButton.height + 2 * UM.Theme.getSize("default_margin").width height: quitButton.height + 2 * UM.Theme.getSize("default_margin").width
color: UM.Theme.getColor("primary") color: UM.Theme.getColor("primary")
visible: false // TODO: enable this when restart is required visible: CuraApplication.getPackageManager().hasPackagesToRemoveOrInstall
anchors anchors
{ {
left: parent.left left: parent.left
@ -270,7 +270,12 @@ Window
Cura.SecondaryButton Cura.SecondaryButton
{ {
id: quitButton 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 id: readMoreButton
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: descriptionLabel.bottom
height: fontMetrics.height //Height of a single line. height: fontMetrics.height //Height of a single line.
text: catalog.i18nc("@info", "Read more") text: catalog.i18nc("@info", "Read more")
@ -324,9 +324,9 @@ Rectangle
state: packageData.stateManageEnableButton state: packageData.stateManageEnableButton
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
primaryText: catalog.i18nc("@button", "Enable") primaryText: catalog.i18nc("@button", "Enable")
busyPrimaryText: catalog.i18nc("@button", "enabling...") busyPrimaryText: catalog.i18nc("@button", "Inabling...")
secondaryText: catalog.i18nc("@button", "Disable") secondaryText: catalog.i18nc("@button", "Disable")
busySecondaryText: catalog.i18nc("@button", "disabling...") busySecondaryText: catalog.i18nc("@button", "Disabling...")
enabled: !(installManageButton.busy || updateManageButton.busy) enabled: !(installManageButton.busy || updateManageButton.busy)
onClicked: { onClicked: {
@ -347,9 +347,9 @@ Rectangle
state: packageData.stateManageInstallButton state: packageData.stateManageInstallButton
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
primaryText: catalog.i18nc("@button", "Install") primaryText: catalog.i18nc("@button", "Install")
busyPrimaryText: catalog.i18nc("@button", "installing...") busyPrimaryText: catalog.i18nc("@button", "Installing...")
secondaryText: catalog.i18nc("@button", "Uninstall") secondaryText: catalog.i18nc("@button", "Uninstall")
busySecondaryText: catalog.i18nc("@button", "uninstalling...") busySecondaryText: catalog.i18nc("@button", "Uninstalling...")
enabled: !(enableManageButton.busy || updateManageButton.busy) enabled: !(enableManageButton.busy || updateManageButton.busy)
onClicked: onClicked:
{ {

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M22 12C22 14.6522 20.9464 17.1957 19.0711 19.0711C17.1957 20.9464 14.6522 22 12 22C9.34784 22 6.8043 20.9464 4.92893 19.0711C3.05357 17.1957 2 14.6522 2 12H4C4 13.5823 4.46919 15.129 5.34824 16.4446C6.22729 17.7602 7.47672 18.7855 8.93853 19.391C10.4003 19.9965 12.0089 20.155 13.5607 19.8463C15.1126 19.5376 16.538 18.7757 17.6569 17.6569C18.7757 16.538 19.5376 15.1126 19.8463 13.5607C20.155 12.0089 19.9965 10.4003 19.391 8.93853C18.7855 7.47672 17.7602 6.22729 16.4446 5.34824C15.129 4.46919 13.5823 4 12 4V2C14.6508 2.00436 17.1918 3.05933 19.0662 4.93375C20.9407 6.80817 21.9956 9.34917 22 12Z"/>
</svg>

After

Width:  |  Height:  |  Size: 703 B