CURA-5035 Added material authors + icons

This commit is contained in:
Ian Paschal 2018-04-17 17:07:06 +02:00
parent b763b2a5a0
commit 7a0fe74989
6 changed files with 68 additions and 22 deletions

View file

@ -83,24 +83,25 @@ Item
}
onExited:
{
thumbnail.border.color = UM.Theme.getColor("text")
thumbnail.border.color = UM.Theme.getColor("lining")
highlight.opacity = 0.0
}
onClicked:
{
console.log(model.icon_url)
if ( toolbox.viewCategory == "material" )
{
toolbox.viewSelection = model.name
toolbox.viewPage = "author"
toolbox.filterModelByProp("authors", "name", model.name)
toolbox.filterModelByProp("packages", "author_name", model.name)
toolbox.filterModelByProp("authors", "name", model.name)
}
else
{
toolbox.viewSelection = model.id
toolbox.viewPage = "detail"
toolbox.filterModelByProp("authors", "name", model.author_name)
toolbox.filterModelByProp("packages", "id", model.id)
toolbox.filterModelByProp("authors", "name", model.author_name)
}
}
}

View file

@ -77,7 +77,17 @@ Item
}
Label
{
text: "<a href=\"mailto:"+model.author_email+"?Subject=Cura: "+model.name+"\">"+model.author_name+"</a>"
text:
{
if (model.author_email)
{
return "<a href=\"mailto:"+model.author_email+"?Subject=Cura: "+model.name+"\">"+model.author_name+"</a>"
}
else
{
return model.author_name
}
}
width: parent.width
height: 24
wrapMode: Text.WordWrap