mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Add placeholders for material & plugin icons
CURA-8762
This commit is contained in:
parent
0d85b2be7f
commit
7926a2bbdc
3 changed files with 24 additions and 2 deletions
|
@ -32,8 +32,24 @@ Item
|
|||
}
|
||||
width: UM.Theme.getSize("card_icon").width
|
||||
height: width
|
||||
|
||||
source: packageData.iconUrl != "" ? packageData.iconUrl : "../images/placeholder.svg"
|
||||
sourceSize.height: height
|
||||
sourceSize.width: width
|
||||
source:
|
||||
{
|
||||
if(packageData.iconUrl != "")
|
||||
{
|
||||
return packageData.iconUrl
|
||||
}
|
||||
if(packageData.packageType == "plugin")
|
||||
{
|
||||
return "../images/Plugin.svg"
|
||||
}
|
||||
if(packageData.packageType == "material")
|
||||
{
|
||||
return "../images/Spool.svg"
|
||||
}
|
||||
return "../images/placeholder.svg"
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue