diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index 2fd8d7b99a..2c723ce4d6 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -57,7 +57,7 @@ Item font: UM.Theme.getFont("large") wrapMode: Text.WordWrap width: parent.width - height: UM.Theme.getSize("base_unit") * 2 + height: UM.Theme.getSize("toolbox_property_label").height } Label { @@ -99,7 +99,6 @@ Item topMargin: UM.Theme.getSize("default_margin").height } spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) - // width: UM.Theme.getSize("base_unit").width * 12 Label { text: diff --git a/plugins/Toolbox/resources/qml/ToolboxBackColumn.qml b/plugins/Toolbox/resources/qml/ToolboxBackColumn.qml index 0b82364fa2..989e065ed4 100644 --- a/plugins/Toolbox/resources/qml/ToolboxBackColumn.qml +++ b/plugins/Toolbox/resources/qml/ToolboxBackColumn.qml @@ -42,8 +42,8 @@ Item color: button.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text") source: UM.Theme.getIcon("arrow_left") } - width: UM.Theme.getSize("base_unit").width * 4 - height: UM.Theme.getSize("base_unit").height * 2 + width: UM.Theme.getSize("toolbox_back_button").width + height: UM.Theme.getSize("toolbox_back_button").height onClicked: { toolbox.viewPage = "overview" diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 9106c770ed..34b12a1a56 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -58,7 +58,7 @@ Item font: UM.Theme.getFont("large") wrapMode: Text.WordWrap width: parent.width - height: UM.Theme.getSize("base_unit") * 2 + height: UM.Theme.getSize("toolbox_property_label").height } Column @@ -102,7 +102,6 @@ Item topMargin: UM.Theme.getSize("default_margin").height } spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) - // width: UM.Theme.getSize("base_unit").width * 12 Label { text: details.version diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index c09d3516ce..a9852b3a40 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -23,7 +23,7 @@ Item Label { width: parent.width - height: UM.Theme.getSize("base_unit").height * 2 + height: UM.Theme.getSize("toolbox_property_label").height text: model.name wrapMode: Text.WordWrap color: UM.Theme.getColor("text") diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml index 0f030401f2..a519e4a86f 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml @@ -13,7 +13,7 @@ Column { id: base height: childrenRect.height - spacing: UM.Theme.getSize("base_unit").height + spacing: UM.Theme.getSize("default_margin").height Label { id: heading @@ -27,8 +27,8 @@ Column id: grid width: parent.width columns: 2 - columnSpacing: UM.Theme.getSize("base_unit").width - rowSpacing: UM.Theme.getSize("base_unit").height + columnSpacing: UM.Theme.getSize("default_margin").height + rowSpacing: UM.Theme.getSize("default_margin").width Repeater { diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml index f783e35305..b6bb72c88d 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml @@ -26,7 +26,7 @@ Column Row { height: childrenRect.height - spacing: UM.Theme.getSize("base_unit").width * 2 + spacing: UM.Theme.getSize("wide_margin").width anchors { horizontalCenter: parent.horizontalCenter diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index 08fc6a4343..dbe56dbd9d 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml @@ -54,7 +54,7 @@ Item } verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter - height: UM.Theme.getSize("base_unit").width * 4 + height: UM.Theme.getSize("toolbox_heading_label").height width: parent.width color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium_bold") diff --git a/plugins/Toolbox/resources/qml/ToolboxFooter.qml b/plugins/Toolbox/resources/qml/ToolboxFooter.qml index eea208f552..65161634d6 100644 --- a/plugins/Toolbox/resources/qml/ToolboxFooter.qml +++ b/plugins/Toolbox/resources/qml/ToolboxFooter.qml @@ -11,12 +11,12 @@ Item id: footer width: parent.width anchors.bottom: parent.bottom - height: visible ? Math.floor(UM.Theme.getSize("base_unit").height * 5.5) : 0 + height: visible ? Math.floor(UM.Theme.getSize("toolbox_footer").height) : 0 Label { visible: toolbox.restartRequired text: "You will need to restart Cura before changes in plugins have effect." - height: Math.floor(UM.Theme.getSize("base_unit").height * 2.5) + height: Math.floor(UM.Theme.getSize("toolbox_footer_button").height) verticalAlignment: Text.AlignVCenter anchors { @@ -45,8 +45,8 @@ Item { background: Rectangle { - implicitWidth: UM.Theme.getSize("base_unit").width * 8 - implicitHeight: Math.floor(UM.Theme.getSize("base_unit").height * 2.5) + implicitWidth: UM.Theme.getSize("toolbox_footer_button").width + implicitHeight: Math.floor(UM.Theme.getSize("toolbox_footer_button").height) color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") } label: Text diff --git a/plugins/Toolbox/resources/qml/ToolboxHeader.qml b/plugins/Toolbox/resources/qml/ToolboxHeader.qml index 6049900051..cd01a34b13 100644 --- a/plugins/Toolbox/resources/qml/ToolboxHeader.qml +++ b/plugins/Toolbox/resources/qml/ToolboxHeader.qml @@ -9,7 +9,7 @@ Item { id: header width: parent.width - height: UM.Theme.getSize("base_unit").height * 4 + height: UM.Theme.getSize("toolbox_header").height * 4 Row { id: bar diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index cd51ce6954..6a4f3e7705 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -11,7 +11,7 @@ Item id: base property bool canUpdate: false property bool isEnabled: true - height: UM.Theme.getSize("base_unit").height * 8 + height: UM.Theme.getSize("toolbox_installed_tile").height anchors { left: parent.left @@ -41,7 +41,7 @@ Item { text: model.name width: parent.width - height: UM.Theme.getSize("base_unit").height * 2 + height: UM.Theme.getSize("toolbox_property_label").height wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter font: UM.Theme.getFont("default_bold") @@ -51,7 +51,7 @@ Item { text: model.description width: parent.width - height: UM.Theme.getSize("base_unit").height * 3 + height: UM.Theme.getSize("toolbox_property_label").height clip: true wrapMode: Text.WordWrap color: pluginInfo.color @@ -61,7 +61,6 @@ Item Column { id: authorInfo - width: UM.Theme.getSize("base_unit").width * 16 height: parent.height anchors { @@ -84,7 +83,7 @@ Item } } width: parent.width - height: UM.Theme.getSize("base_unit").height * 3 + height: UM.Theme.getSize("toolbox_property_label").height wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft @@ -122,8 +121,8 @@ Item { background: Rectangle { - implicitWidth: UM.Theme.getSize("base_unit").width * 8 - implicitHeight: Math.floor(UM.Theme.getSize("base_unit").width * 2.5) + implicitWidth: UM.Theme.getSize("toolbox_action_button").width + implicitHeight: UM.Theme.getSize("toolbox_action_button").height color: "transparent" border { @@ -167,8 +166,8 @@ Item { background: Rectangle { - implicitWidth: UM.Theme.getSize("base_unit").width * 8 - implicitHeight: UM.Theme.getSize("base_unit").width * 2.5 + implicitWidth: UM.Theme.getSize("toolbox_action_button").width + implicitHeight: UM.Theme.getSize("toolbox_action_button").height color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") } label: Label @@ -193,7 +192,7 @@ Item left: updateButton.left right: updateButton.right top: updateButton.bottom - topMargin: Math.floor(UM.Theme.getSize("base_unit") / 4) + topMargin: Math.floor(UM.Theme.getSize("default_margin") / 4) } value: toolbox.isDownloading ? toolbox.downloadProgress : 0 visible: toolbox.isDownloading @@ -202,7 +201,7 @@ Item background: Rectangle { color: UM.Theme.getColor("lining") - implicitHeight: Math.floor(UM.Theme.getSize("base_unit").height / 2) + implicitHeight: Math.floor(UM.Theme.getSize("toolbox_progress_bar").height) } progress: Rectangle { diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index f016d0eb79..99d4f3f5a1 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -447,11 +447,19 @@ "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.0], + "toolbox_footer": [1.0, 5.5], + "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_tile": [1.0, 8.0], - "toolbox_back_column": [6.0, 1.0] + "toolbox_back_column": [6.0, 1.0], + "toolbox_back_button": [4.0, 2.0], + "toolbox_installed_tile": [1.0, 8.0], + "toolbox_property_label": [1.0, 2.0], + "toolbox_heading_label": [1.0, 4.0], + "toolbox_header": [1.0, 4.0], + "toolbox_action_button": [8.0, 2.5], + "toolbox_progress_bar": [8.0, 0.5] } }