diff --git a/plugins/Toolbox/resources/qml/Toolbox.qml b/plugins/Toolbox/resources/qml/Toolbox.qml index cdbe2f0710..f7784ec7ce 100644 --- a/plugins/Toolbox/resources/qml/Toolbox.qml +++ b/plugins/Toolbox/resources/qml/Toolbox.qml @@ -12,6 +12,8 @@ Window property var selection: null title: catalog.i18nc("@title", "Toolbox") modality: Qt.ApplicationModal + flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint + width: 720 * screenScaleFactor height: 640 * screenScaleFactor minimumWidth: 720 * screenScaleFactor diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index 6c87f9d2e2..04b055ed66 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM @@ -9,7 +9,7 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection + property var details: base.selection || {} anchors.fill: parent ToolboxBackColumn { @@ -32,6 +32,7 @@ Item height: UM.Theme.getSize("toolbox_thumbnail_medium").height fillMode: Image.PreserveAspectFit source: details.icon_url || "../images/logobot.svg" + mipmap: true anchors { top: parent.top @@ -53,7 +54,7 @@ Item rightMargin: UM.Theme.getSize("wide_margin").width bottomMargin: UM.Theme.getSize("default_margin").height } - text: details.name + text: details.name || "" font: UM.Theme.getFont("large") wrapMode: Text.WordWrap width: parent.width @@ -62,7 +63,7 @@ Item Label { id: description - text: details.description + text: details.description || "" anchors { top: title.bottom @@ -114,6 +115,7 @@ Item } font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") + linkColor: UM.Theme.getColor("text_link") onLinkActivated: Qt.openUrlExternally(link) } } diff --git a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml index f0066c2698..229ab5afb3 100644 --- a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml +++ b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml @@ -37,8 +37,8 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value + elide: Text.ElideRight + text: styleData.value || "" color: UM.Theme.getColor("text") font: UM.Theme.getFont("default_bold") } @@ -56,8 +56,8 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value + elide: Text.ElideRight + text: styleData.value || "" color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("default") } @@ -68,8 +68,8 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value + elide: Text.ElideRight + text: styleData.value || "" color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("default") } diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 920065ca9d..d57acac52d 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM @@ -33,6 +33,7 @@ Item height: UM.Theme.getSize("toolbox_thumbnail_medium").height fillMode: Image.PreserveAspectFit source: details.icon_url || "../images/logobot.svg" + mipmap: true anchors { top: parent.top @@ -54,8 +55,9 @@ Item rightMargin: UM.Theme.getSize("wide_margin").width bottomMargin: UM.Theme.getSize("default_margin").height } - text: details.name + text: details.name || "" font: UM.Theme.getFont("large") + color: UM.Theme.getColor("text") wrapMode: Text.WordWrap width: parent.width height: UM.Theme.getSize("toolbox_property_label").height @@ -133,6 +135,7 @@ Item } font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") + linkColor: UM.Theme.getColor("text_link") onLinkActivated: Qt.openUrlExternally(link) } } diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index dab90f8e06..80d50616e8 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -11,7 +11,7 @@ Item id: tile property bool installed: toolbox.isInstalled(model.id) 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: normalData.height + compatibilityChart.height + 4 * UM.Theme.getSize("default_margin").height Item { id: normalData @@ -76,58 +76,9 @@ Item } enabled: installed || !(toolbox.isDownloading && toolbox.activePackage != model) //Don't allow installing while another download is running. opacity: enabled ? 1.0 : 0.5 - style: ButtonStyle - { - background: Rectangle - { - implicitWidth: 96 - implicitHeight: 30 - color: - { - if (installed) - { - return UM.Theme.getColor("action_button_disabled") - } - else - { - if ( control.hovered ) - { - return UM.Theme.getColor("primary_hover") - } - else - { - return UM.Theme.getColor("primary") - } - } - } - } - label: Label - { - text: control.text - color: - { - if (installed) - { - return UM.Theme.getColor("action_button_disabled_text") - } - else - { - if ( control.hovered ) - { - return UM.Theme.getColor("button_text_hover") - } - else - { - return UM.Theme.getColor("button_text") - } - } - } - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - font: UM.Theme.getFont("default_bold") - } - } + property alias installed: tile.installed + style: UM.Theme.styles.toolbox_action_button onClicked: { if (installed) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index e0e25982db..17b28fe136 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 @@ -34,10 +34,11 @@ Item Image { anchors.centerIn: parent - width: UM.Theme.getSize("toolbox_thumbnail_small").width - 26 - height: UM.Theme.getSize("toolbox_thumbnail_small").height - 26 + width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("wide_margin").width + height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("wide_margin").width fillMode: Image.PreserveAspectFit source: model.icon_url || "../images/logobot.svg" + mipmap: true } } Column diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index a699e9dae6..f665404df7 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM @@ -9,7 +9,7 @@ import UM 1.1 as UM Item { width: UM.Theme.getSize("toolbox_thumbnail_large").width - height: childrenRect.height + height: thumbnail.height + packageName.height Rectangle { id: highlight @@ -40,14 +40,16 @@ Item height: UM.Theme.getSize("toolbox_thumbnail_large").height - 2 * UM.Theme.getSize("default_margin").height fillMode: Image.PreserveAspectFit source: model.icon_url || "../images/logobot.svg" + mipmap: true } } Label { + id: packageName text: model.name anchors { - bottom: parent.bottom + top: thumbnail.bottom horizontalCenter: parent.horizontalCenter } verticalAlignment: Text.AlignVCenter diff --git a/plugins/Toolbox/resources/qml/ToolboxFooter.qml b/plugins/Toolbox/resources/qml/ToolboxFooter.qml index 098a52d49a..b83d14a08b 100644 --- a/plugins/Toolbox/resources/qml/ToolboxFooter.qml +++ b/plugins/Toolbox/resources/qml/ToolboxFooter.qml @@ -49,7 +49,7 @@ Item implicitHeight: Math.floor(UM.Theme.getSize("toolbox_footer_button").height) color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") } - label: Text + label: Label { color: UM.Theme.getColor("button_text") font: UM.Theme.getFont("default_bold") diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index ff27e004b2..0ed71845f5 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -89,6 +89,7 @@ Item horizontalAlignment: Text.AlignLeft onLinkActivated: Qt.openUrlExternally("mailto:" + model.author_email + "?Subject=Cura: " + model.name + " Plugin") color: model.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining") + linkColor: UM.Theme.getColor("text_link") } } Column @@ -130,7 +131,7 @@ Item color: UM.Theme.getColor("lining") } } - label: Text + label: Label { text: control.text color: UM.Theme.getColor("text") diff --git a/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml b/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml index 33bc466d29..b8baf7bc83 100644 --- a/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml +++ b/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml @@ -42,7 +42,7 @@ UM.Dialog anchors.right: parent.right anchors.topMargin: UM.Theme.getSize("default_margin").height readOnly: true - text: licenseDialog.licenseContent + text: licenseDialog.licenseContent || "" } } rightButtons: diff --git a/plugins/Toolbox/resources/qml/ToolboxTabButton.qml b/plugins/Toolbox/resources/qml/ToolboxTabButton.qml index a61e77d241..0f759c75fb 100644 --- a/plugins/Toolbox/resources/qml/ToolboxTabButton.qml +++ b/plugins/Toolbox/resources/qml/ToolboxTabButton.qml @@ -25,7 +25,7 @@ Button height: UM.Theme.getSize("sidebar_header_highlight").height } } - label: Text + label: Label { text: control.text color: diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 6b454b7cf1..14e7d196a7 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -1033,4 +1033,59 @@ QtObject { label: Item { } } } + + property Component toolbox_action_button: Component { + ButtonStyle + { + background: Rectangle + { + implicitWidth: UM.Theme.getSize("toolbox_action_button").width + implicitHeight: UM.Theme.getSize("toolbox_action_button").height + color: + { + if (control.installed) + { + return UM.Theme.getColor("action_button_disabled") + } + else + { + if (control.hovered) + { + return UM.Theme.getColor("primary_hover") + } + else + { + return UM.Theme.getColor("primary") + } + } + + } + } + label: Label + { + text: control.text + color: + { + if (control.installed) + { + return UM.Theme.getColor("action_button_disabled_text") + } + else + { + if (control.hovered) + { + return UM.Theme.getColor("button_text_hover") + } + else + { + return UM.Theme.getColor("button_text") + } + } + } + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + font: UM.Theme.getFont("default_bold") + } + } + } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index c78a51a3a9..1be61b523a 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -460,6 +460,7 @@ "toolbox_header": [1.0, 4.0], "toolbox_action_button": [8.0, 2.5], "toolbox_progress_bar": [8.0, 0.5], - "toolbox_chart_row": [1.0, 2.0] + "toolbox_chart_row": [1.0, 2.0], + "toolbox_action_button": [8.0, 2.5] } }