diff --git a/plugins/Toolbox/resources/qml/Toolbox.qml b/plugins/Toolbox/resources/qml/Toolbox.qml index 3fe5e75bb0..0254bb0dcd 100644 --- a/plugins/Toolbox/resources/qml/Toolbox.qml +++ b/plugins/Toolbox/resources/qml/Toolbox.qml @@ -9,6 +9,7 @@ import UM 1.1 as UM Window { id: base + property var selection: null title: catalog.i18nc("@title", "Toolbox") modality: Qt.ApplicationModal width: 720 * screenScaleFactor diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index a19ab513eb..6c87f9d2e2 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -8,8 +8,8 @@ import UM 1.1 as UM Item { - id: base - property var details: toolbox.viewSelection + id: page + property var details: base.selection anchors.fill: parent ToolboxBackColumn { @@ -130,9 +130,9 @@ Item anchors { top: header.bottom - bottom: base.bottom + bottom: page.bottom left: header.left - right: base.right + right: page.right } } } diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailList.qml b/plugins/Toolbox/resources/qml/ToolboxDetailList.qml index 1b9e6e5b45..7e319974a4 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailList.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailList.qml @@ -6,19 +6,20 @@ import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM -Item +Rectangle { - id: base + id: detailList + // color: "green" ScrollView { frameVisible: false - anchors.fill: base + anchors.fill: detailList style: UM.Theme.styles.scrollview Column { anchors { - right: base.right + right: detailList.right topMargin: UM.Theme.getSize("wide_margin").height bottomMargin: UM.Theme.getSize("wide_margin").height top: parent.top diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index ab2debbfe9..fa1aa8ba23 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -8,8 +8,8 @@ import UM 1.1 as UM Item { - id: base - property var details: toolbox.viewSelection + id: page + property var details: base.selection anchors.fill: parent width: parent.width ToolboxBackColumn @@ -149,9 +149,9 @@ Item anchors { top: header.bottom - bottom: base.bottom + bottom: page.bottom left: header.left - right: base.right + right: page.right } } } diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index a9852b3a40..1080a9213b 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -8,8 +8,9 @@ import UM 1.1 as UM Item { + id: tile property bool installed: toolbox.isInstalled(model.id) - width: base.width - UM.Theme.getSize("wide_margin").width + width: detailList.width - UM.Theme.getSize("wide_margin").width height: UM.Theme.getSize("toolbox_detail_tile").height Column { @@ -55,9 +56,10 @@ Item Rectangle { id: controls - anchors.right: parent.right - anchors.top: parent.top + anchors.right: tile.right + anchors.top: tile.top width: childrenRect.width + color: "blue" Button { id: installButton @@ -180,9 +182,9 @@ Item Rectangle { color: UM.Theme.getColor("lining") - width: parent.width + width: tile.width height: UM.Theme.getSize("default_lining").height - anchors.bottom: parent.bottom + anchors.bottom: tile.bottom } Connections { diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml index ac64fc5697..8393eb045c 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml @@ -11,7 +11,6 @@ import UM 1.1 as UM Column { - id: base height: childrenRect.height width: parent.width spacing: UM.Theme.getSize("default_margin").height diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index 20124100ba..4d479278b2 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -9,7 +9,6 @@ import UM 1.1 as UM Item { - id: base height: childrenRect.height Layout.alignment: Qt.AlignTop | Qt.AlignLeft Rectangle @@ -88,7 +87,7 @@ Item } onClicked: { - toolbox.viewSelection = model + base.selection = model switch(toolbox.viewCategory) { case "material": diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml index d7101f40b3..f665d5c5f5 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml @@ -8,14 +8,14 @@ import UM 1.1 as UM ScrollView { - id: base + id: page frameVisible: false width: parent.width height: parent.height style: UM.Theme.styles.scrollview Column { - width: base.width + width: page.width spacing: UM.Theme.getSize("default_margin").height padding: UM.Theme.getSize("wide_margin").height height: childrenRect.height + 2 * padding diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml index b1c7b50b56..d3ce443704 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml @@ -8,7 +8,6 @@ import UM 1.1 as UM Column { - id: base height: childrenRect.height spacing: UM.Theme.getSize("toolbox_showcase_spacing").width width: parent.width diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index 4cc2a01c61..57dc16a4b8 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml @@ -64,7 +64,7 @@ Item anchors.fill: parent onClicked: { - toolbox.viewSelection = model + base.selection = model switch(toolbox.viewCategory) { case "material": diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledPage.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledPage.qml index 075902904f..9d916182f6 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledPage.qml @@ -10,7 +10,7 @@ import UM 1.1 as UM ScrollView { - id: base + id: page frameVisible: false width: parent.width height: parent.height @@ -68,7 +68,7 @@ ScrollView Label { visible: toolbox.materialsInstalledModel.items.length > 0 - width: base.width + width: page.width text: catalog.i18nc("@title:tab", "Materials") color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("medium") diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index 1a847ab15e..e8c9a17eba 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -8,7 +8,6 @@ import UM 1.1 as UM Item { - id: base property bool canUpdate: false property bool isEnabled: true height: UM.Theme.getSize("toolbox_installed_tile").height diff --git a/plugins/Toolbox/resources/qml/ToolboxLoadingPage.qml b/plugins/Toolbox/resources/qml/ToolboxLoadingPage.qml index 755479803e..fc712e83e1 100644 --- a/plugins/Toolbox/resources/qml/ToolboxLoadingPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxLoadingPage.qml @@ -7,7 +7,7 @@ import QtQuick.Controls.Styles 1.4 Rectangle { - id: base + id: page width: parent.width height: parent.height color: "transparent" diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 99d4f3f5a1..ce54156e48 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -447,7 +447,7 @@ "toolbox_thumbnail_small": [6.0, 6.0], "toolbox_thumbnail_medium": [8.0, 8.0], "toolbox_thumbnail_large": [12.0, 12.0], - "toolbox_footer": [1.0, 5.5], + "toolbox_footer": [1.0, 4.5], "toolbox_footer_button": [8.0, 2.5], "toolbox_showcase_spacing": [1.0, 1.0], "toolbox_header_tab": [8.0, 4.0],