mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Show why the download button is disabled
This commit is contained in:
parent
0a163439a4
commit
6b05bd21fb
1 changed files with 13 additions and 2 deletions
|
@ -67,7 +67,7 @@ UM.Dialog
|
|||
anchors.left:parent.left
|
||||
anchors.right: closeButton.left
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
value: manager.downloadProgress
|
||||
value: manager.isDownloading ? manager.downloadProgress : 0
|
||||
}
|
||||
|
||||
Button
|
||||
|
@ -121,7 +121,18 @@ UM.Dialog
|
|||
Button
|
||||
{
|
||||
id: downloadButton
|
||||
text: (model.already_installed && model.can_upgrade) ? catalog.i18nc("@action:button", "Upgrade") : catalog.i18nc("@action:button", "Download")
|
||||
text:
|
||||
{
|
||||
if (model.already_installed)
|
||||
{
|
||||
if (model.can_upgrade)
|
||||
{
|
||||
return catalog.i18nc("@action:button", "Upgrade");
|
||||
}
|
||||
return catalog.i18nc("@action:button", "Installed");
|
||||
}
|
||||
return catalog.i18nc("@action:button", "Download");
|
||||
}
|
||||
onClicked: manager.downloadAndInstallPlugin(model.file_location)
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue