From 7d30cee205e60a54aad86f0aeb7289a0b3096a82 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 4 Jul 2018 11:36:56 +0200 Subject: [PATCH 1/2] Revert "Add dummy details for when there is no selection" This reverts commit 2e3528d9b25b7b3a76cdbb145de955b5d1826bd2. --- .../Toolbox/resources/qml/ToolboxAuthorPage.qml | 11 +---------- .../Toolbox/resources/qml/ToolboxDetailPage.qml | 14 +------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index d2f75936d1..04b055ed66 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -9,17 +9,8 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection || dummy_details + property var details: base.selection || {} anchors.fill: parent - - property var dummy_details: new Object({ - name: "", - description: "", - email: "", - website: "", - icon_url: "" - }) - ToolboxBackColumn { id: sidebar diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index f7c329a67b..4c6c8c6ba4 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -9,21 +9,9 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection || dummy_details + property var details: base.selection anchors.fill: parent width: parent.width - - property var dummy_details: new Object({ - name: '', - version: '', - last_updated: '', - author_email: '', - author_name: '', - website: '', - icon_url: '', - download_count: '' - }) - ToolboxBackColumn { id: sidebar From d4aaec73550148ee8ea749b6697b74d81a49dcb2 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 4 Jul 2018 12:51:01 +0200 Subject: [PATCH 2/2] CURA-5537 Style improvements --- plugins/Toolbox/resources/qml/ToolboxDetailPage.qml | 2 ++ plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml | 2 +- plugins/Toolbox/resources/qml/ToolboxFooter.qml | 1 + resources/themes/cura-light/theme.json | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 4c6c8c6ba4..cf4bfcd545 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -74,6 +74,7 @@ Item } spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) width: childrenRect.width + height: childrenRect.height Label { text: catalog.i18nc("@label", "Version") + ":" @@ -110,6 +111,7 @@ Item topMargin: UM.Theme.getSize("default_margin").height } spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) + height: childrenRect.height Label { text: details.version || catalog.i18nc("@label", "Unknown") diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml index 06a6ba30fb..823a85cf09 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml @@ -25,7 +25,7 @@ Column { id: grid property var model: toolbox.viewCategory == "material" ? toolbox.authorsModel : toolbox.packagesModel - width: parent.width + width: parent.width - 2 * parent.padding columns: 2 columnSpacing: UM.Theme.getSize("default_margin").height rowSpacing: UM.Theme.getSize("default_margin").width diff --git a/plugins/Toolbox/resources/qml/ToolboxFooter.qml b/plugins/Toolbox/resources/qml/ToolboxFooter.qml index 980ac5f8c9..976ff46da6 100644 --- a/plugins/Toolbox/resources/qml/ToolboxFooter.qml +++ b/plugins/Toolbox/resources/qml/ToolboxFooter.qml @@ -25,6 +25,7 @@ Item right: restartButton.right rightMargin: UM.Theme.getSize("default_margin").width } + color: UM.Theme.getColor("text") } Button { diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index a087a489eb..7bcdafce98 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -448,7 +448,7 @@ "toolbox_footer_button": [8.0, 2.5], "toolbox_showcase_spacing": [1.0, 1.0], "toolbox_header_tab": [8.0, 4.0], - "toolbox_detail_header": [1.0, 12.0], + "toolbox_detail_header": [1.0, 14.0], "toolbox_detail_tile": [1.0, 8.0], "toolbox_back_column": [6.0, 1.0], "toolbox_back_button": [4.0, 2.0],