CURA-4644 Set the property in the component where is being used.

This commit is contained in:
Diego Prado Gesto 2018-05-04 14:03:26 +02:00
parent 6b214d2443
commit b00d51a6eb
3 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,7 @@ import UM 1.1 as UM
Item Item
{ {
property var packageData
anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.topMargin: UM.Theme.getSize("default_margin").height
height: visible ? childrenRect.height : 0 height: visible ? childrenRect.height : 0
visible: packageData.type == "material" && packageData.has_configs visible: packageData.type == "material" && packageData.has_configs

View File

@ -10,7 +10,6 @@ Item
{ {
id: tile id: tile
property bool installed: toolbox.isInstalled(model.id) property bool installed: toolbox.isInstalled(model.id)
property var packageData: model
width: detailList.width - UM.Theme.getSize("wide_margin").width width: detailList.width - UM.Theme.getSize("wide_margin").width
height: Math.max(UM.Theme.getSize("toolbox_detail_tile").height, childrenRect.height + UM.Theme.getSize("default_margin").height) height: Math.max(UM.Theme.getSize("toolbox_detail_tile").height, childrenRect.height + UM.Theme.getSize("default_margin").height)
Item Item
@ -46,6 +45,7 @@ Item
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
} }
} }
Item Item
{ {
id: controls id: controls
@ -164,6 +164,7 @@ Item
id: compatibilityChart id: compatibilityChart
anchors.top: normalData.bottom anchors.top: normalData.bottom
width: normalData.width width: normalData.width
packageData: model
} }
Rectangle Rectangle

View File

@ -59,7 +59,7 @@ class PackagesModel(ListModel):
"version": package["package_version"], "version": package["package_version"],
"author_id": package["author"]["author_id"] if "author_id" in package["author"] else package["author"]["name"], "author_id": package["author"]["author_id"] if "author_id" in package["author"] else package["author"]["name"],
"author_name": package["author"]["display_name"] if "display_name" in package["author"] else package["author"]["name"], "author_name": package["author"]["display_name"] if "display_name" in package["author"] else package["author"]["name"],
"author_email": package["author"]["email"] if "email" in package["author"] else "None", "author_email": package["author"]["email"] if "email" in package["author"] else None,
"description": package["description"], "description": package["description"],
"icon_url": package["icon_url"] if "icon_url" in package else None, "icon_url": package["icon_url"] if "icon_url" in package else None,
"image_urls": package["image_urls"] if "image_urls" in package else None, "image_urls": package["image_urls"] if "image_urls" in package else None,