mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Show install, uninstall & disable buttons in packages list
This splits up the single show controls property into three seperate ones and no longer hides installed packages from the plugin & materials list CURA-8834
This commit is contained in:
parent
6cbcf09580
commit
095b8dc5dd
8 changed files with 28 additions and 16 deletions
|
@ -12,10 +12,13 @@ import Cura 1.6 as Cura
|
|||
// are combined into the reusable "PackageCardHeader" component
|
||||
Item
|
||||
{
|
||||
default property alias contents: contentItem.children;
|
||||
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
|
||||
|
@ -157,7 +160,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
|
||||
|
@ -171,7 +174,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)
|
||||
|
@ -201,7 +204,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