mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
CURA-5035 Added material authors + icons
This commit is contained in:
parent
b763b2a5a0
commit
7a0fe74989
6 changed files with 68 additions and 22 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue