mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Only show manage buttons in manage tab or detail view
Contributes to: CURA-8587
This commit is contained in:
parent
f6966c25fb
commit
1c0e484069
5 changed files with 12 additions and 0 deletions
|
@ -20,6 +20,7 @@ Packages
|
|||
bannerVisible = false;
|
||||
}
|
||||
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-plugins-browser"
|
||||
packagesManageableInListView: true
|
||||
|
||||
model: Marketplace.LocalPackageList
|
||||
{
|
||||
|
|
|
@ -17,6 +17,7 @@ Packages
|
|||
bannerVisible = false;
|
||||
}
|
||||
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/materials?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-materials-browser"
|
||||
packagesManageableInListView: false
|
||||
|
||||
model: Marketplace.RemotePackageList
|
||||
{
|
||||
|
|
|
@ -10,8 +10,10 @@ import Cura 1.6 as Cura
|
|||
|
||||
Rectangle
|
||||
{
|
||||
id: root
|
||||
property var packageData
|
||||
property bool expanded: false
|
||||
property bool manageableInListView
|
||||
|
||||
height: childrenRect.height
|
||||
color: UM.Theme.getColor("main_background")
|
||||
|
@ -328,6 +330,7 @@ Rectangle
|
|||
secondaryText: catalog.i18nc("@button", "Disable")
|
||||
busySecondaryText: catalog.i18nc("@button", "Disabling...")
|
||||
enabled: !(installManageButton.busy || updateManageButton.busy)
|
||||
visible: root.manageableInListView || root.expanded
|
||||
|
||||
onClicked: {
|
||||
if (primary_action)
|
||||
|
@ -351,6 +354,8 @@ Rectangle
|
|||
secondaryText: catalog.i18nc("@button", "Uninstall")
|
||||
busySecondaryText: catalog.i18nc("@button", "Uninstalling...")
|
||||
enabled: !(enableManageButton.busy || updateManageButton.busy)
|
||||
visible: root.manageableInListView || root.expanded
|
||||
|
||||
onClicked:
|
||||
{
|
||||
if (primary_action)
|
||||
|
@ -372,6 +377,8 @@ Rectangle
|
|||
primaryText: catalog.i18nc("@button", "Update")
|
||||
busyPrimaryText: catalog.i18nc("@button", "updating...")
|
||||
enabled: !(installManageButton.busy || enableManageButton.busy)
|
||||
visible: root.manageableInListView || root.expanded
|
||||
|
||||
onClicked: packageData.updatePackageTriggered(packageData.packageId)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ ListView
|
|||
property string bannerText
|
||||
property string bannerReadMoreUrl
|
||||
property var onRemoveBanner
|
||||
property bool packagesManageableInListView
|
||||
|
||||
clip: true
|
||||
|
||||
|
@ -80,6 +81,7 @@ ListView
|
|||
|
||||
PackageCard
|
||||
{
|
||||
manageableInListView: packages.packagesManageableInListView
|
||||
packageData: model.package
|
||||
width: parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("narrow_margin").width
|
||||
color: cardMouseArea.containsMouse ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("main_background")
|
||||
|
|
|
@ -17,6 +17,7 @@ Packages
|
|||
bannerVisible = false;
|
||||
}
|
||||
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-plugins-browser"
|
||||
packagesManageableInListView: false
|
||||
|
||||
model: Marketplace.RemotePackageList
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue