From a5a35ef98b4583b32cc2013e54729359db88ac75 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 18 Apr 2018 16:47:28 +0200 Subject: [PATCH] CURA-5035 Added dummy author text --- .../resources/qml/ToolboxAuthorPage.qml | 18 ++++++++++++++---- plugins/Toolbox/src/AuthorsModel.py | 4 +++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index d30ec8845c..5fb92bfaa3 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -60,14 +60,24 @@ Item width: parent.width height: UM.Theme.getSize("base_unit") * 2 } - + Label + { + id: description + text: details.description + anchors + { + top: title.bottom + left: title.left + topMargin: UM.Theme.getSize("default_margin").height + } + } Column { id: properties anchors { - top: title.bottom - left: title.left + top: description.bottom + left: description.left topMargin: UM.Theme.getSize("default_margin").height } spacing: Math.floor(UM.Theme.getSize("default_margin").height / 2) @@ -84,7 +94,7 @@ Item id: values anchors { - top: title.bottom + top: description.bottom left: properties.right leftMargin: UM.Theme.getSize("default_margin").width topMargin: UM.Theme.getSize("default_margin").height diff --git a/plugins/Toolbox/src/AuthorsModel.py b/plugins/Toolbox/src/AuthorsModel.py index b85980bd8d..f61fdbe223 100644 --- a/plugins/Toolbox/src/AuthorsModel.py +++ b/plugins/Toolbox/src/AuthorsModel.py @@ -21,6 +21,7 @@ class AuthorsModel(ListModel): self.addRoleName(Qt.UserRole + 4, "type") self.addRoleName(Qt.UserRole + 5, "icon_url") self.addRoleName(Qt.UserRole + 6, "packages_count") + self.addRoleName(Qt.UserRole + 7, "description") # List of filters for queries. The result is the union of the each list of results. self._filter = {} # type: Dict[str,str] @@ -39,7 +40,8 @@ class AuthorsModel(ListModel): "website": author["website"], "type": author["type"] if "type" in author else None, "icon_url": author["icon_url"] if "icon_url" in author else None, - "packages_count": author["packages_count"] if "packages_count" in author else 0 + "packages_count": author["packages_count"] if "packages_count" in author else 0, + "description": "Material and quality profiles from {author_name}".format( author_name = author["name"]) }) # Filter on all the key-word arguments.