mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Merge pull request #11536 from Ultimaker/CURA-8834_marketplace_packages_install_status_in_list
Show install, uninstall & disable buttons in packages list
This commit is contained in:
commit
9fa6698da3
8 changed files with 27 additions and 15 deletions
|
@ -15,7 +15,10 @@ Item
|
|||
default property alias contents: contentItem.children
|
||||
|
||||
property var packageData
|
||||
property bool showManageButtons: false
|
||||
property bool showDisableButton: false
|
||||
property bool showInstallButton: false
|
||||
property bool showUpdateButton: false
|
||||
|
||||
|
||||
width: parent.width
|
||||
height: UM.Theme.getSize("card").height
|
||||
|
@ -170,7 +173,7 @@ Item
|
|||
ManageButton
|
||||
{
|
||||
id: enableManageButton
|
||||
visible: showManageButtons && packageData.isInstalled && !packageData.isToBeInstalled && packageData.packageType != "material"
|
||||
visible: showDisableButton && packageData.isInstalled && !packageData.isToBeInstalled && packageData.packageType != "material"
|
||||
enabled: !packageData.busy
|
||||
|
||||
button_style: !packageData.isActive
|
||||
|
@ -184,7 +187,7 @@ Item
|
|||
ManageButton
|
||||
{
|
||||
id: installManageButton
|
||||
visible: showManageButtons && (packageData.canDowngrade || !packageData.isBundled)
|
||||
visible: showInstallButton && (packageData.canDowngrade || !packageData.isBundled)
|
||||
enabled: !packageData.busy
|
||||
busy: packageData.busy
|
||||
button_style: !(packageData.isInstalled || packageData.isToBeInstalled)
|
||||
|
@ -214,7 +217,7 @@ Item
|
|||
ManageButton
|
||||
{
|
||||
id: updateManageButton
|
||||
visible: showManageButtons && packageData.canUpdate
|
||||
visible: showUpdateButton && packageData.canUpdate
|
||||
enabled: !packageData.busy
|
||||
busy: packageData.busy
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue