Replace RecolorImage with ColorImage

CURA-8640
This commit is contained in:
c.lamboo 2022-04-08 15:55:34 +02:00
parent 3de824e1a4
commit 45bc498c7f
64 changed files with 88 additions and 141 deletions

View File

@ -426,7 +426,7 @@ UM.Dialog
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
visible: manager.hasObjectsOnPlate visible: manager.hasObjectsOnPlate
UM.RecolorImage UM.ColorImage
{ {
width: warningLabel.height width: warningLabel.height
height: width height: width

View File

@ -17,7 +17,7 @@ RowLayout
property alias label: detailName.text property alias label: detailName.text
property alias value: detailValue.text property alias value: detailValue.text
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon
width: 18 * screenScaleFactor width: 18 * screenScaleFactor

View File

@ -30,7 +30,7 @@ Cura.RoundedRectangle
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
UM.RecolorImage UM.ColorImage
{ {
id: projectImage id: projectImage
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View File

@ -33,7 +33,7 @@ UM.Dialog
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
leftPadding: UM.Theme.getSize("narrow_margin").width leftPadding: UM.Theme.getSize("narrow_margin").width
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon
width: UM.Theme.getSize("marketplace_large_icon").width width: UM.Theme.getSize("marketplace_large_icon").width

View File

@ -46,7 +46,7 @@ Item
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
width: childrenRect.width width: childrenRect.width
UM.RecolorImage UM.ColorImage
{ {
id: busyIndicator id: busyIndicator
visible: parent.visible visible: parent.visible

View File

@ -33,7 +33,7 @@ TabButton
visible: root.hovered visible: root.hovered
} }
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon

View File

@ -251,7 +251,7 @@ Window
margins: UM.Theme.getSize("default_margin").width margins: UM.Theme.getSize("default_margin").width
} }
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
UM.RecolorImage UM.ColorImage
{ {
id: bannerIcon id: bannerIcon
source: UM.Theme.getIcon("Plugin") source: UM.Theme.getIcon("Plugin")

View File

@ -20,7 +20,7 @@ Rectangle
color: UM.Theme.getColor("action_panel_secondary") color: UM.Theme.getColor("action_panel_secondary")
// Icon // Icon
UM.RecolorImage UM.ColorImage
{ {
id: onboardingIcon id: onboardingIcon
anchors anchors

View File

@ -47,12 +47,10 @@ Item
sourceSize.width: width sourceSize.width: width
} }
UM.RecolorImage UM.ColorImage
{ {
visible: !parent.packageHasIcon visible: !parent.packageHasIcon
anchors.fill: parent anchors.fill: parent
sourceSize.height: height
sourceSize.width: width
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
source: source:
{ {
@ -123,7 +121,7 @@ Item
Layout.preferredWidth: UM.Theme.getSize("card_tiny_icon").width + 2 * padding Layout.preferredWidth: UM.Theme.getSize("card_tiny_icon").width + 2 * padding
Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").width + 2 * padding Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").width + 2 * padding
contentItem: UM.RecolorImage contentItem: UM.ColorImage
{ {
source: UM.Theme.getIcon("LinkExternal") source: UM.Theme.getIcon("LinkExternal")
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")

View File

@ -46,7 +46,7 @@ Rectangle
// But we re-use the package page for the manage plugins as well. The one user that doesn't see // But we re-use the package page for the manage plugins as well. The one user that doesn't see
// the num downloads is an acceptable "sacrifice" to make this easy to fix. // the num downloads is an acceptable "sacrifice" to make this easy to fix.
visible: packageData.downloadCount != "0" visible: packageData.downloadCount != "0"
UM.RecolorImage UM.ColorImage
{ {
id: downloadsIcon id: downloadsIcon
width: UM.Theme.getSize("card_tiny_icon").width width: UM.Theme.getSize("card_tiny_icon").width

View File

@ -213,7 +213,7 @@ ListView
status: UM.StatusIcon.Status.ERROR status: UM.StatusIcon.Status.ERROR
visible: false visible: false
} }
UM.RecolorImage UM.ColorImage
{ {
id: loadMoreIcon id: loadMoreIcon
anchors.fill: parent anchors.fill: parent

View File

@ -32,7 +32,7 @@ Control
anchors.fill: parent anchors.fill: parent
color: UM.Theme.getColor("action_button_hovered") color: UM.Theme.getColor("action_button_hovered")
radius: width radius: width
UM.RecolorImage UM.ColorImage
{ {
anchors.fill: parent anchors.fill: parent
color: UM.Theme.getColor("primary") color: UM.Theme.getColor("primary")

View File

@ -123,7 +123,7 @@ Rectangle
visible: !isNetworkConfigured && isNetworkConfigurable visible: !isNetworkConfigured && isNetworkConfigurable
width: childrenRect.width width: childrenRect.width
UM.RecolorImage UM.ColorImage
{ {
id: externalLinkIcon id: externalLinkIcon
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View File

@ -79,7 +79,7 @@ Item
{ {
id: normalButton id: normalButton
text: catalog.i18nc("@label", "Normal model") text: catalog.i18nc("@label", "Normal model")
toolItem: UM.RecolorImage toolItem: UM.ColorImage
{ {
source: UM.Theme.getIcon("Infill0") source: UM.Theme.getIcon("Infill0")
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")
@ -94,7 +94,7 @@ Item
{ {
id: supportMeshButton id: supportMeshButton
text: catalog.i18nc("@label", "Print as support") text: catalog.i18nc("@label", "Print as support")
toolItem: UM.RecolorImage toolItem: UM.ColorImage
{ {
source: UM.Theme.getIcon("MeshTypeSupport") source: UM.Theme.getIcon("MeshTypeSupport")
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")
@ -109,7 +109,7 @@ Item
{ {
id: overlapMeshButton id: overlapMeshButton
text: catalog.i18nc("@label", "Modify settings for overlaps") text: catalog.i18nc("@label", "Modify settings for overlaps")
toolItem: UM.RecolorImage toolItem: UM.ColorImage
{ {
source: UM.Theme.getIcon("MeshTypeIntersect") source: UM.Theme.getIcon("MeshTypeIntersect")
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")
@ -124,7 +124,7 @@ Item
{ {
id: antiOverhangMeshButton id: antiOverhangMeshButton
text: catalog.i18nc("@label", "Don't support overlaps") text: catalog.i18nc("@label", "Don't support overlaps")
toolItem: UM.RecolorImage toolItem: UM.ColorImage
{ {
source: UM.Theme.getIcon("BlockSupportOverlaps") source: UM.Theme.getIcon("BlockSupportOverlaps")
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")
@ -304,12 +304,11 @@ Item
background: Item background: Item
{ {
UM.RecolorImage UM.ColorImage
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: parent.width width: parent.width
height: width height: width
sourceSize.height: width
color: parent.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button") color: parent.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button")
source: UM.Theme.getIcon("Minus") source: UM.Theme.getIcon("Minus")
} }

View File

@ -143,14 +143,12 @@ UM.Dialog
} }
} }
UM.RecolorImage UM.ColorImage
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: parent.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") color: parent.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
source: UM.Theme.getIcon("ChevronSingleDown") source: UM.Theme.getIcon("ChevronSingleDown")
} }
@ -175,14 +173,12 @@ UM.Dialog
} }
} }
UM.RecolorImage UM.ColorImage
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: upButton.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") color: upButton.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
source: UM.Theme.getIcon("ChevronSingleUp") source: UM.Theme.getIcon("ChevronSingleUp")
} }
@ -200,14 +196,12 @@ UM.Dialog
onClicked: manager.removeScriptByIndex(index) onClicked: manager.removeScriptByIndex(index)
} }
UM.RecolorImage UM.ColorImage
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
source: UM.Theme.getIcon("Cancel") source: UM.Theme.getIcon("Cancel")
} }

View File

@ -91,13 +91,11 @@ Item
height: parent.height height: parent.height
width: visible ? (headerPadding * 3 + UM.Theme.getSize("button_icon").height + iconSize) : 0 width: visible ? (headerPadding * 3 + UM.Theme.getSize("button_icon").height + iconSize) : 0
headerItem: UM.RecolorImage headerItem: UM.ColorImage
{ {
id: menuIcon id: menuIcon
source: UM.Theme.getIcon("Folder", "medium") source: UM.Theme.getIcon("Folder", "medium")
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")
sourceSize.height: height
} }
contentItem: Item contentItem: Item
@ -177,7 +175,7 @@ Item
contentItem: Item contentItem: Item
{ {
UM.RecolorImage UM.ColorImage
{ {
id: buttonIcon id: buttonIcon
source: UM.Theme.getIcon("Folder", "medium") source: UM.Theme.getIcon("Folder", "medium")
@ -185,8 +183,6 @@ Item
width: UM.Theme.getSize("button_icon").width width: UM.Theme.getSize("button_icon").width
height: UM.Theme.getSize("button_icon").height height: UM.Theme.getSize("button_icon").height
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")
sourceSize.height: height
} }
} }

View File

@ -21,7 +21,7 @@ Button
color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_card_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled") color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_card_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled")
} }
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon
anchors anchors

View File

@ -45,7 +45,7 @@ Item
radius: Math.floor(height / 2) radius: Math.floor(height / 2)
} }
UM.RecolorImage UM.ColorImage
{ {
id: buildplateIcon id: buildplateIcon
anchors.centerIn: parent anchors.centerIn: parent

View File

@ -75,13 +75,11 @@ Item
contentItem: Item contentItem: Item
{ {
anchors.fill: parent anchors.fill: parent
UM.RecolorImage UM.ColorImage
{ {
anchors.centerIn: parent anchors.centerIn: parent
width: 18 // TODO: Theme! width: 18 // TODO: Theme!
height: width // TODO: Theme! height: width // TODO: Theme!
sourceSize.width: width // TODO: Theme!
sourceSize.height: width // TODO: Theme!
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
source: UM.Theme.getIcon("ChevronSingleLeft") source: UM.Theme.getIcon("ChevronSingleLeft")
} }
@ -154,13 +152,11 @@ Item
contentItem: Item contentItem: Item
{ {
anchors.fill: parent anchors.fill: parent
UM.RecolorImage UM.ColorImage
{ {
anchors.centerIn: parent anchors.centerIn: parent
width: 18 // TODO: Theme! width: 18 // TODO: Theme!
height: width // TODO: Theme! height: width // TODO: Theme!
sourceSize.width: width // TODO: Theme!
sourceSize.height: width // TODO: Theme!
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
source: UM.Theme.getIcon("ChevronSingleRight") source: UM.Theme.getIcon("ChevronSingleRight")
} }

View File

@ -27,7 +27,7 @@ Item
height: size height: size
width: size width: size
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon
anchors.fill: parent anchors.fill: parent

View File

@ -38,7 +38,7 @@ Item
} }
UM.RecolorImage UM.ColorImage
{ {
id: ultiBotImage id: ultiBotImage
@ -46,18 +46,13 @@ Item
color: UM.Theme.getColor("monitor_placeholder_image") color: UM.Theme.getColor("monitor_placeholder_image")
height: printJobPreview.height height: printJobPreview.height
source: "../svg/ultibot.svg" source: "../svg/ultibot.svg"
sourceSize
{
height: height
width: width
}
/* Since print jobs ALWAYS have an image url, we have to check if that image URL errors or /* Since print jobs ALWAYS have an image url, we have to check if that image URL errors or
not in order to determine if we show the placeholder (ultibot) image instead. */ not in order to determine if we show the placeholder (ultibot) image instead. */
visible: printJob && previewImage.status == Image.Error visible: printJob && previewImage.status == Image.Error
width: printJobPreview.width width: printJobPreview.width
} }
UM.RecolorImage UM.ColorImage
{ {
id: overlayIcon id: overlayIcon
anchors.centerIn: printJobPreview anchors.centerIn: printJobPreview
@ -90,11 +85,6 @@ Item
} }
return "" return ""
} }
sourceSize
{
height: height
width: width
}
visible: source != "" visible: source != ""
width: 0.5 * printJobPreview.width width: 0.5 * printJobPreview.width
} }

View File

@ -147,7 +147,7 @@ Item
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
text: catalog.i18nc("@label link to Connect and Cloud interfaces", "Manage printer") text: catalog.i18nc("@label link to Connect and Cloud interfaces", "Manage printer")
} }
UM.RecolorImage UM.ColorImage
{ {
id: externalLinkIcon id: externalLinkIcon
anchors anchors

View File

@ -40,7 +40,7 @@ Item
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
width: childrenRect.width width: childrenRect.width
UM.RecolorImage UM.ColorImage
{ {
id: externalLinkIcon id: externalLinkIcon
anchors.verticalCenter: manageQueueLabel.verticalCenter anchors.verticalCenter: manageQueueLabel.verticalCenter

View File

@ -45,7 +45,7 @@ Item
cached: true cached: true
}*/ }*/
UM.RecolorImage UM.ColorImage
{ {
id: profileImageOutline id: profileImageOutline
anchors.centerIn: parent anchors.centerIn: parent
@ -54,7 +54,6 @@ Item
height: parent.height + 2 height: parent.height + 2
visible: hasAvatar visible: hasAvatar
source: UM.Theme.getIcon("CircleOutline") source: UM.Theme.getIcon("CircleOutline")
sourceSize: Qt.size(parent.width, parent.height)
color: UM.Theme.getColor("account_widget_outline_active") color: UM.Theme.getColor("account_widget_outline_active")
} }
} }

View File

@ -43,7 +43,7 @@ Row // Sync state icon + message
} }
] ]
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon
width: 20 * screenScaleFactor width: 20 * screenScaleFactor

View File

@ -62,14 +62,12 @@ Button
spacing: UM.Theme.getSize("narrow_margin").width spacing: UM.Theme.getSize("narrow_margin").width
height: button.height height: button.height
//Left side icon. Only displayed if !isIconOnRightSide. //Left side icon. Only displayed if !isIconOnRightSide.
UM.RecolorImage UM.ColorImage
{ {
id: buttonIconLeft id: buttonIconLeft
source: "" source: ""
height: visible ? button.iconSize : 0 height: visible ? button.iconSize : 0
width: visible ? height : 0 width: visible ? height : 0
sourceSize.width: width
sourceSize.height: height
color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor) : button.textDisabledColor color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor) : button.textDisabledColor
visible: source != "" && !button.isIconOnRightSide visible: source != "" && !button.isIconOnRightSide
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -109,14 +107,12 @@ Button
} }
//Right side icon. Only displayed if isIconOnRightSide. //Right side icon. Only displayed if isIconOnRightSide.
UM.RecolorImage UM.ColorImage
{ {
id: buttonIconRight id: buttonIconRight
source: buttonIconLeft.source source: buttonIconLeft.source
height: visible ? button.iconSize : 0 height: visible ? button.iconSize : 0
width: visible ? height : 0 width: visible ? height : 0
sourceSize.width: width
sourceSize.height: height
color: buttonIconLeft.color color: buttonIconLeft.color
visible: source != "" && button.isIconOnRightSide visible: source != "" && button.isIconOnRightSide
anchors.verticalCenter: buttonIconLeft.verticalCenter anchors.verticalCenter: buttonIconLeft.verticalCenter

View File

@ -7,7 +7,7 @@ import QtQuick.Controls 2.1
import UM 1.1 as UM import UM 1.1 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
UM.RecolorImage UM.ColorImage
{ {
id: widget id: widget

View File

@ -45,7 +45,7 @@ Button
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
UM.RecolorImage UM.ColorImage
{ {
id: applicationIcon id: applicationIcon
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
@ -54,7 +54,7 @@ Button
width: UM.Theme.getSize("application_switcher_icon").width width: UM.Theme.getSize("application_switcher_icon").width
height: width height: width
UM.RecolorImage UM.ColorImage
{ {
id: externalLinkIndicatorIcon id: externalLinkIndicatorIcon
visible: base.isExternalLink visible: base.isExternalLink

View File

@ -31,7 +31,7 @@ Item
Behavior on opacity { NumberAnimation { duration: 100; } } Behavior on opacity { NumberAnimation { duration: 100; } }
} }
UM.RecolorImage UM.ColorImage
{ {
anchors.fill: parent anchors.fill: parent
color: UM.Theme.getColor("primary_text") color: UM.Theme.getColor("primary_text")

View File

@ -78,7 +78,7 @@ Button
id: content id: content
//spacing: UM.Theme.getSize("narrow_margin").width //spacing: UM.Theme.getSize("narrow_margin").width
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon
source: "" source: ""
@ -88,8 +88,6 @@ Button
width: visible ? UM.Theme.getSize("section_icon").width: 0 width: visible ? UM.Theme.getSize("section_icon").width: 0
height: UM.Theme.getSize("section_icon").height height: UM.Theme.getSize("section_icon").height
anchors.leftMargin: base.indented ? UM.Theme.getSize("default_margin").width: 0 anchors.leftMargin: base.indented ? UM.Theme.getSize("default_margin").width: 0
sourceSize.width: width
sourceSize.height: width
} }
UM.Label UM.Label
@ -106,15 +104,13 @@ Button
color: UM.Theme.getColor("setting_category_text") color: UM.Theme.getColor("setting_category_text")
} }
UM.RecolorImage UM.ColorImage
{ {
id: categoryArrow id: categoryArrow
anchors.right: parent.right anchors.right: parent.right
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
sourceSize.width: width
sourceSize.height: height
color: UM.Theme.getColor("setting_control_button") color: UM.Theme.getColor("setting_control_button")
source: expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft") source: expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft")
} }

View File

@ -80,7 +80,7 @@ UM.Dialog
implicitHeight: UM.Theme.getSize("medium_button_icon").height implicitHeight: UM.Theme.getSize("medium_button_icon").height
radius: width / 2 radius: width / 2
UM.RecolorImage UM.ColorImage
{ {
anchors.fill: parent anchors.fill: parent
visible: swatchColor == base.color visible: swatchColor == base.color

View File

@ -155,7 +155,7 @@ Item
} }
} }
UM.RecolorImage UM.ColorImage
{ {
id: collapseButton id: collapseButton
anchors anchors

View File

@ -51,10 +51,9 @@ Cura.RoundedRectangle
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
contentItem: UM.RecolorImage contentItem: UM.ColorImage
{ {
anchors.fill: parent anchors.fill: parent
sourceSize.width: width
color: closeButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") color: closeButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
source: UM.Theme.getIcon("Cancel") source: UM.Theme.getIcon("Cancel")
} }

View File

@ -174,7 +174,7 @@ Item
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
} }
UM.RecolorImage UM.ColorImage
{ {
id: collapseButton id: collapseButton
anchors anchors

View File

@ -15,7 +15,7 @@ Item
property color materialColor property color materialColor
property alias textColor: extruderNumberText.color property alias textColor: extruderNumberText.color
property bool extruderEnabled: true property bool extruderEnabled: true
property alias iconSize: mainIcon.sourceSize property var iconSize
property string iconVariant: "medium" property string iconVariant: "medium"
Item Item
@ -24,19 +24,21 @@ Item
anchors.fill: parent anchors.fill: parent
layer.enabled: true // Prevent weird opacity effects. layer.enabled: true // Prevent weird opacity effects.
UM.RecolorImage UM.ColorImage
{ {
anchors.fill: parent anchors.fill: parent
sourceSize: mainIcon.sourceSize width: mainIcon.sourceSize.width
height: mainIcon.sourceSize.height
source: UM.Theme.getIcon("ExtruderColor", iconVariant) source: UM.Theme.getIcon("ExtruderColor", iconVariant)
color: materialColor color: materialColor
} }
UM.RecolorImage UM.ColorImage
{ {
id: mainIcon id: mainIcon
anchors.fill: parent anchors.fill: parent
sourceSize: UM.Theme.getSize("extruder_icon") width: UM.Theme.getSize("extruder_icon").width
height: UM.Theme.getSize("extruder_icon").height
source: UM.Theme.getIcon("Extruder", iconVariant) source: UM.Theme.getIcon("Extruder", iconVariant)
color: extruderNumberText.color color: extruderNumberText.color

View File

@ -35,7 +35,7 @@ Item
implicitWidth: icon.width + 100 implicitWidth: icon.width + 100
implicitHeight: icon.height implicitHeight: icon.height
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon
width: UM.Theme.getSize("section_icon").width width: UM.Theme.getSize("section_icon").width

View File

@ -88,7 +88,7 @@ Button
visible: !configurationItem.isValidMaterial visible: !configurationItem.isValidMaterial
UM.RecolorImage UM.ColorImage
{ {
id: icon id: icon
anchors.verticalCenter: unknownMaterialMessage.verticalCenter anchors.verticalCenter: unknownMaterialMessage.verticalCenter

View File

@ -109,7 +109,7 @@ Cura.ExpandablePopup
} }
// Warning icon that indicates if no qualities are available for the variant/material combination for this extruder // Warning icon that indicates if no qualities are available for the variant/material combination for this extruder
UM.RecolorImage UM.ColorImage
{ {
id: badge id: badge
anchors anchors

View File

@ -304,7 +304,7 @@ Item
height: UM.Theme.getSize("small_button").height height: UM.Theme.getSize("small_button").height
width: UM.Theme.getSize("small_button").width width: UM.Theme.getSize("small_button").width
anchors.centerIn: parent anchors.centerIn: parent
background: UM.RecolorImage background: UM.ColorImage
{ {
source: UM.Theme.getIcon("Guide") source: UM.Theme.getIcon("Guide")
color: instructionButton.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("icon") color: instructionButton.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("icon")
@ -369,15 +369,13 @@ Item
width: selectors.controlWidth width: selectors.controlWidth
height: childrenRect.height height: childrenRect.height
UM.RecolorImage UM.ColorImage
{ {
id: warningImage id: warningImage
anchors.left: parent.left anchors.left: parent.left
source: UM.Theme.getIcon("Warning") source: UM.Theme.getIcon("Warning")
width: UM.Theme.getSize("section_icon").width width: UM.Theme.getSize("section_icon").width
height: UM.Theme.getSize("section_icon").height height: UM.Theme.getSize("section_icon").height
sourceSize.width: width
sourceSize.height: height
color: UM.Theme.getColor("material_compatibility_warning") color: UM.Theme.getColor("material_compatibility_warning")
visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning
} }

View File

@ -146,7 +146,7 @@ Button
labelText: perObjectSettingsCount.toString() labelText: perObjectSettingsCount.toString()
} }
UM.RecolorImage UM.ColorImage
{ {
id: meshTypeIcon id: meshTypeIcon
anchors anchors

View File

@ -41,12 +41,11 @@ Item
width: parent.width width: parent.width
height: label.height height: label.height
UM.RecolorImage UM.ColorImage
{ {
id: openCloseIcon id: openCloseIcon
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
anchors.left: parent.left anchors.left: parent.left
color: openCloseButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") color: openCloseButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
source: objectSelector.opened ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleUp") source: objectSelector.opened ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleUp")

View File

@ -106,7 +106,7 @@ Rectangle
anchors.right: materialSlot.right anchors.right: materialSlot.right
visible: false visible: false
UM.RecolorImage UM.ColorImage
{ {
id: favoriteIndicator id: favoriteIndicator
anchors.centerIn: parent anchors.centerIn: parent

View File

@ -298,7 +298,7 @@ Window
iconSize: UM.Theme.getSize("machine_selector_icon").width iconSize: UM.Theme.getSize("machine_selector_icon").width
//Printer status badge (always cloud, but whether it's online or offline). //Printer status badge (always cloud, but whether it's online or offline).
UM.RecolorImage UM.ColorImage
{ {
width: UM.Theme.getSize("printer_status_icon").width width: UM.Theme.getSize("printer_status_icon").width
height: UM.Theme.getSize("printer_status_icon").height height: UM.Theme.getSize("printer_status_icon").height
@ -326,7 +326,7 @@ Window
} }
} }
UM.RecolorImage UM.ColorImage
{ {
id: printerSpinner id: printerSpinner
width: UM.Theme.getSize("section_icon").width width: UM.Theme.getSize("section_icon").width
@ -491,7 +491,7 @@ Window
visible: !syncButton.visible visible: !syncButton.visible
UM.RecolorImage UM.ColorImage
{ {
id: syncingIcon id: syncingIcon
height: UM.Theme.getSize("action_button_icon").height height: UM.Theme.getSize("action_button_icon").height

View File

@ -74,7 +74,7 @@ Item
} }
} }
UM.RecolorImage UM.ColorImage
{ {
anchors.centerIn: parent anchors.centerIn: parent
width: Math.round(check.height * 0.75) | 0 width: Math.round(check.height * 0.75) | 0

View File

@ -89,7 +89,7 @@ ToolButton
{ {
id: background id: background
UM.RecolorImage UM.ColorImage
{ {
id: downArrow id: downArrow
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -97,7 +97,6 @@ ToolButton
anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.rightMargin: UM.Theme.getSize("default_margin").width
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.height: width
color: base.enabled ? UM.Theme.getColor("setting_control_button") : UM.Theme.getColor("setting_category_disabled_text") color: base.enabled ? UM.Theme.getColor("setting_control_button") : UM.Theme.getColor("setting_category_disabled_text")
source: UM.Theme.getIcon("ChevronSingleDown") source: UM.Theme.getIcon("ChevronSingleDown")
} }

View File

@ -159,7 +159,7 @@ Item
} }
onExited: base.hideTooltip() onExited: base.hideTooltip()
} }
UM.RecolorImage UM.ColorImage
{ {
id: downArrow id: downArrow

View File

@ -44,7 +44,7 @@ Button
{ {
height: button.height height: button.height
width: button.width width: button.width
UM.RecolorImage UM.ColorImage
{ {
id: check id: check
height: UM.Theme.getSize("default_arrow").height height: UM.Theme.getSize("default_arrow").height

View File

@ -16,7 +16,7 @@ Item
implicitWidth: UM.Theme.getSize("section_icon").width implicitWidth: UM.Theme.getSize("section_icon").width
implicitHeight: UM.Theme.getSize("section_icon").height implicitHeight: UM.Theme.getSize("section_icon").height
UM.RecolorImage UM.ColorImage
{ {
source: UM.Theme.getIcon("Information") source: UM.Theme.getIcon("Information")
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")

View File

@ -226,7 +226,7 @@ Item
color: UM.Theme.getColor("lining") color: UM.Theme.getColor("lining")
} }
UM.RecolorImage UM.ColorImage
{ {
width: UM.Theme.getSize("drag_icon").width width: UM.Theme.getSize("drag_icon").width
height: UM.Theme.getSize("drag_icon").height height: UM.Theme.getSize("drag_icon").height

View File

@ -154,7 +154,7 @@ Item
when: supportExtruderCombobox.model.count > 0 when: supportExtruderCombobox.model.count > 0
} }
indicator: UM.RecolorImage indicator: UM.ColorImage
{ {
id: downArrow id: downArrow
x: supportExtruderCombobox.width - width - supportExtruderCombobox.rightPadding x: supportExtruderCombobox.width - width - supportExtruderCombobox.rightPadding
@ -163,8 +163,6 @@ Item
source: UM.Theme.getIcon("ChevronSingleDown") source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_button") color: UM.Theme.getColor("setting_control_button")
} }

View File

@ -108,7 +108,7 @@ Cura.ExpandablePopup
iconColor: UM.Theme.getColor("machine_selector_printer_icon") iconColor: UM.Theme.getColor("machine_selector_printer_icon")
iconSize: source != "" ? UM.Theme.getSize("machine_selector_icon").width: 0 iconSize: source != "" ? UM.Theme.getSize("machine_selector_icon").width: 0
UM.RecolorImage UM.ColorImage
{ {
id: connectionStatusImage id: connectionStatusImage
anchors anchors

View File

@ -17,7 +17,7 @@ Cura.TextField
placeholderText: catalog.i18nc("@placeholder", "Search") placeholderText: catalog.i18nc("@placeholder", "Search")
font.italic: true font.italic: true
UM.RecolorImage UM.ColorImage
{ {
id: searchIcon id: searchIcon

View File

@ -143,13 +143,12 @@ SettingItem
return UM.Theme.getColor("checkbox") return UM.Theme.getColor("checkbox")
} }
UM.RecolorImage UM.ColorImage
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
height: UM.Theme.getSize("checkbox_mark").height height: UM.Theme.getSize("checkbox_mark").height
width: UM.Theme.getSize("checkbox_mark").width width: UM.Theme.getSize("checkbox_mark").width
sourceSize.height: width
color: !enabled ? UM.Theme.getColor("checkbox_mark_disabled") : UM.Theme.getColor("checkbox_mark"); color: !enabled ? UM.Theme.getColor("checkbox_mark_disabled") : UM.Theme.getColor("checkbox_mark");
source: UM.Theme.getIcon("Check", "low") source: UM.Theme.getIcon("Check", "low")
opacity: control.checked ? 1 : 0 opacity: control.checked ? 1 : 0

View File

@ -98,7 +98,7 @@ SettingItem
when: control.model.items.length > 0 when: control.model.items.length > 0
} }
indicator: UM.RecolorImage indicator: UM.ColorImage
{ {
id: downArrow id: downArrow
x: control.width - width - control.rightPadding x: control.width - width - control.rightPadding
@ -107,8 +107,6 @@ SettingItem
source: UM.Theme.getIcon("ChevronSingleDown") source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_button"); color: UM.Theme.getColor("setting_control_button");
} }

View File

@ -99,7 +99,7 @@ SettingItem
value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : "transparent" value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : "transparent"
} }
indicator: UM.RecolorImage indicator: UM.ColorImage
{ {
id: downArrow id: downArrow
x: control.width - width - control.rightPadding x: control.width - width - control.rightPadding
@ -108,8 +108,6 @@ SettingItem
source: UM.Theme.getIcon("ChevronSingleDown") source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_button") color: UM.Theme.getColor("setting_control_button")
} }

View File

@ -51,7 +51,7 @@ Item
property var expandedCategories property var expandedCategories
property bool lastFindingSettings: false property bool lastFindingSettings: false
UM.RecolorImage UM.ColorImage
{ {
id: searchIcon id: searchIcon

View File

@ -109,7 +109,7 @@ Item
color: spinBox.down.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") color: spinBox.down.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background")
} }
UM.RecolorImage UM.ColorImage
{ {
anchors.centerIn: parent anchors.centerIn: parent
height: parent.height / 2.5 height: parent.height / 2.5
@ -129,7 +129,7 @@ Item
color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background")
} }
UM.RecolorImage UM.ColorImage
{ {
anchors.centerIn: parent anchors.centerIn: parent
height: parent.height / 2.5 height: parent.height / 2.5

View File

@ -63,13 +63,10 @@ Item
isTopElement: toolsModel.getItem(0).id == model.id isTopElement: toolsModel.getItem(0).id == model.id
isBottomElement: toolsModel.getItem(toolsModel.count - 1).id == model.id isBottomElement: toolsModel.getItem(toolsModel.count - 1).id == model.id
toolItem: UM.RecolorImage toolItem: UM.ColorImage
{ {
source: UM.Theme.getIcon(model.icon) != "" ? UM.Theme.getIcon(model.icon) : "file:///" + model.location + "/" + model.icon source: UM.Theme.getIcon(model.icon) != "" ? UM.Theme.getIcon(model.icon) : "file:///" + model.location + "/" + model.icon
color: UM.Theme.getColor("icon") color: UM.Theme.getColor("icon")
sourceSize.height: Math.round(UM.Theme.getSize("button").height / 2)
sourceSize.width: Math.round(UM.Theme.getSize("button").width / 2)
} }
onCheckedChanged: onCheckedChanged:

View File

@ -115,14 +115,12 @@ Item
width: childrenRect.width width: childrenRect.width
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
UM.RecolorImage UM.ColorImage
{ {
id: arrow id: arrow
anchors.left: parent.left anchors.left: parent.left
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight") source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight")
} }

View File

@ -200,7 +200,7 @@ Item
height: troubleshootingLinkIcon.height height: troubleshootingLinkIcon.height
width: troubleshootingLinkIcon.width + troubleshootingLabel.width + UM.Theme.getSize("thin_margin").width width: troubleshootingLinkIcon.width + troubleshootingLabel.width + UM.Theme.getSize("thin_margin").width
UM.RecolorImage UM.ColorImage
{ {
id: troubleshootingLinkIcon id: troubleshootingLinkIcon
anchors.right: troubleshootingLabel.left anchors.right: troubleshootingLabel.left

View File

@ -57,7 +57,7 @@ Cura.RoundedRectangle
color: base.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") color: base.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text")
} }
UM.RecolorImage UM.ColorImage
{ {
id: rightIcon id: rightIcon
anchors.right: parent.right anchors.right: parent.right

View File

@ -39,7 +39,7 @@ ComboBox
background: UM.UnderlineBackground{} background: UM.UnderlineBackground{}
indicator: UM.RecolorImage indicator: UM.ColorImage
{ {
id: downArrow id: downArrow
x: control.width - width - control.rightPadding x: control.width - width - control.rightPadding
@ -48,8 +48,6 @@ ComboBox
source: UM.Theme.getIcon("ChevronSingleDown") source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_button") color: UM.Theme.getColor("setting_control_button")
} }

View File

@ -18,7 +18,7 @@ UM.MenuItem
property bool overrideShowArrow: false property bool overrideShowArrow: false
arrow: UM.RecolorImage arrow: UM.ColorImage
{ {
visible: menuItem.subMenu || overrideShowArrow visible: menuItem.subMenu || overrideShowArrow
height: UM.Theme.getSize("default_arrow").height height: UM.Theme.getSize("default_arrow").height
@ -30,7 +30,7 @@ UM.MenuItem
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
} }
indicator: UM.RecolorImage indicator: UM.ColorImage
{ {
id: check id: check
visible: menuItem.checkable && menuItem.checked visible: menuItem.checkable && menuItem.checked

View File

@ -53,7 +53,7 @@ TextField
{ {
id: backgroundRectangle id: backgroundRectangle
//Optional icon added on the left hand side. //Optional icon added on the left hand side.
UM.RecolorImage UM.ColorImage
{ {
id: iconLeft id: iconLeft