Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2022-02-24 15:26:28 +0300
committerGitHub <noreply@github.com>2022-02-24 15:26:28 +0300
commit19e43e8b663b3c40afe7a1e314e32bf410ae8a09 (patch)
treeccb4b1d3718808c929dd7385faeb35e78493ba18 /plugins/Marketplace/resources
parentdf9d2d85c43dc4d25a7bfafa0bf4b36c5cfff602 (diff)
Apply suggestions from code review
CURA-8762 Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
Diffstat (limited to 'plugins/Marketplace/resources')
-rw-r--r--plugins/Marketplace/resources/qml/PackageCardHeader.qml13
-rw-r--r--plugins/Marketplace/resources/qml/Packages.qml2
2 files changed, 6 insertions, 9 deletions
diff --git a/plugins/Marketplace/resources/qml/PackageCardHeader.qml b/plugins/Marketplace/resources/qml/PackageCardHeader.qml
index ca4165b97a..9e3e673ea2 100644
--- a/plugins/Marketplace/resources/qml/PackageCardHeader.qml
+++ b/plugins/Marketplace/resources/qml/PackageCardHeader.qml
@@ -36,19 +36,16 @@ Item
sourceSize.width: width
source:
{
- if(packageData.iconUrl != "")
+ if (packageData.iconUrl != "")
{
return packageData.iconUrl
}
- if(packageData.packageType == "plugin")
+ switch (packageData.packageType)
{
- return "../images/Plugin.svg"
+ case "plugin": return "../images/Plugin.svg";
+ case "material": return "../images/Spool.svg";
+ default: return "../images/placeholder.svg";
}
- if(packageData.packageType == "material")
- {
- return "../images/Spool.svg"
- }
- return "../images/placeholder.svg"
}
}
diff --git a/plugins/Marketplace/resources/qml/Packages.qml b/plugins/Marketplace/resources/qml/Packages.qml
index 17fa884ad7..5cd52e5628 100644
--- a/plugins/Marketplace/resources/qml/Packages.qml
+++ b/plugins/Marketplace/resources/qml/Packages.qml
@@ -84,7 +84,7 @@ ListView
manageableInListView: packages.packagesManageableInListView
packageData: model.package
width: {
- if(verticalScrollBar.visible)
+ if (verticalScrollBar.visible)
{
return parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("default_margin").width
}