diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml index 1d1a1e44e1..3f53abf28f 100644 --- a/resources/qml/ActionPanel/OutputProcessWidget.qml +++ b/resources/qml/ActionPanel/OutputProcessWidget.qml @@ -44,7 +44,7 @@ Column rightMargin: UM.Theme.getSize("thin_margin").height } - Cura.IconLabel + Cura.IconWithText { id: estimatedTime width: parent.width @@ -54,7 +54,7 @@ Column font: UM.Theme.getFont("default_bold") } - Cura.IconLabel + Cura.IconWithText { id: estimatedCosts width: parent.width @@ -84,7 +84,6 @@ Column return totalWeights + "g ยท " + totalLengths.toFixed(2) + "m" } source: UM.Theme.getIcon("spool") - font: UM.Theme.getFont("default") } } diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml index 8f6608e15c..18caeafb40 100644 --- a/resources/qml/ActionPanel/SliceProcessWidget.qml +++ b/resources/qml/ActionPanel/SliceProcessWidget.qml @@ -52,7 +52,7 @@ Column renderType: Text.NativeRendering } - Cura.IconLabel + Cura.IconWithText { id: unableToSliceMessage width: parent.width @@ -61,7 +61,6 @@ Column text: catalog.i18nc("@label:PrintjobStatus", "Unable to Slice") source: UM.Theme.getIcon("warning") color: UM.Theme.getColor("warning") - font: UM.Theme.getFont("default") } // Progress bar, only visible when the backend is in the process of slice the printjob diff --git a/resources/qml/IconLabel.qml b/resources/qml/IconLabel.qml deleted file mode 100644 index ed41fba499..0000000000 --- a/resources/qml/IconLabel.qml +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 -import QtQuick.Controls 2.3 - -import UM 1.1 as UM - -// This item will show a label with a squared icon in the left -Item -{ - id: container - - property alias text: label.text - property alias source: icon.source - property alias color: label.color - property alias font: label.font - property alias iconSize: icon.width - - implicitHeight: icon.height - - UM.RecolorImage - { - id: icon - - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - - source: "" - width: UM.Theme.getSize("section_icon").width - height: width - - color: label.color - visible: source != "" - } - - Label - { - id: label - anchors.left: icon.visible ? icon.right : parent.left - anchors.right: parent.right - anchors.leftMargin: UM.Theme.getSize("thin_margin").width - anchors.verticalCenter: icon.verticalCenter - text: "Empty label" - elide: Text.ElideRight - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering - } -} \ No newline at end of file diff --git a/resources/qml/IconWithText.qml b/resources/qml/IconWithText.qml index 22599b3aed..5530740040 100644 --- a/resources/qml/IconWithText.qml +++ b/resources/qml/IconWithText.qml @@ -13,9 +13,11 @@ import Cura 1.0 as Cura // It sets the icon size + half of the content as its minium width (in which case it will elide the text) Item { - property alias iconColor: icon.color property alias source: icon.source + property alias iconSize: icon.width + property alias color: label.color property alias text: label.text + property alias font: label.font property real margin: UM.Theme.getSize("narrow_margin").width @@ -37,7 +39,7 @@ Item width: UM.Theme.getSize("section_icon").width height: UM.Theme.getSize("section_icon").height - color: "black" + color: label.color anchors { diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml index d4057289f6..518f3d49eb 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml @@ -43,7 +43,6 @@ RowLayout source: UM.Theme.getIcon("category_support") text: supportEnabled.properties.value == "True" ? enabledText : disabledText - UM.SettingPropertyProvider { id: supportEnabled diff --git a/resources/qml/qmldir b/resources/qml/qmldir index c19b982318..1dc21150ce 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -7,7 +7,6 @@ ActionButton 1.0 ActionButton.qml MaterialMenu 1.0 MaterialMenu.qml NozzleMenu 1.0 NozzleMenu.qml ActionPanelWidget 1.0 ActionPanelWidget.qml -IconLabel 1.0 IconLabel.qml IconWithText 1.0 IconWithText.qml OutputDevicesActionButton 1.0 OutputDevicesActionButton.qml ExpandableComponent 1.0 ExpandableComponent.qml