Remove the component IconLabel since we have a similar one in IconWithText

Contributes to CURA-5941.
This commit is contained in:
Diego Prado Gesto 2018-12-07 11:43:41 +01:00
parent 8f0d8c7d25
commit 898fd25ddb
6 changed files with 7 additions and 59 deletions

View file

@ -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")
}
}

View file

@ -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

View file

@ -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
}
}

View file

@ -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
{

View file

@ -43,7 +43,6 @@ RowLayout
source: UM.Theme.getIcon("category_support")
text: supportEnabled.properties.value == "True" ? enabledText : disabledText
UM.SettingPropertyProvider
{
id: supportEnabled

View file

@ -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