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

@ -45,7 +45,7 @@ Item
cached: true
}*/
UM.RecolorImage
UM.ColorImage
{
id: profileImageOutline
anchors.centerIn: parent
@ -54,7 +54,6 @@ Item
height: parent.height + 2
visible: hasAvatar
source: UM.Theme.getIcon("CircleOutline")
sourceSize: Qt.size(parent.width, parent.height)
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
width: 20 * screenScaleFactor

View file

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

View file

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

View file

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

View file

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

View file

@ -78,7 +78,7 @@ Button
id: content
//spacing: UM.Theme.getSize("narrow_margin").width
UM.RecolorImage
UM.ColorImage
{
id: icon
source: ""
@ -88,8 +88,6 @@ Button
width: visible ? UM.Theme.getSize("section_icon").width: 0
height: UM.Theme.getSize("section_icon").height
anchors.leftMargin: base.indented ? UM.Theme.getSize("default_margin").width: 0
sourceSize.width: width
sourceSize.height: width
}
UM.Label
@ -106,15 +104,13 @@ Button
color: UM.Theme.getColor("setting_category_text")
}
UM.RecolorImage
UM.ColorImage
{
id: categoryArrow
anchors.right: parent.right
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
anchors.verticalCenter: parent.verticalCenter
sourceSize.width: width
sourceSize.height: height
color: UM.Theme.getColor("setting_control_button")
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
radius: width / 2
UM.RecolorImage
UM.ColorImage
{
anchors.fill: parent
visible: swatchColor == base.color

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -88,7 +88,7 @@ Button
visible: !configurationItem.isValidMaterial
UM.RecolorImage
UM.ColorImage
{
id: icon
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
UM.RecolorImage
UM.ColorImage
{
id: badge
anchors

View file

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

View file

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

View file

@ -41,12 +41,11 @@ Item
width: parent.width
height: label.height
UM.RecolorImage
UM.ColorImage
{
id: openCloseIcon
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
anchors.left: parent.left
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")

View file

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

View file

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

View file

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

View file

@ -89,7 +89,7 @@ ToolButton
{
id: background
UM.RecolorImage
UM.ColorImage
{
id: downArrow
anchors.verticalCenter: parent.verticalCenter
@ -97,7 +97,6 @@ ToolButton
anchors.rightMargin: UM.Theme.getSize("default_margin").width
width: UM.Theme.getSize("standard_arrow").width
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")
source: UM.Theme.getIcon("ChevronSingleDown")
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -63,13 +63,10 @@ Item
isTopElement: toolsModel.getItem(0).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
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:

View file

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

View file

@ -200,7 +200,7 @@ Item
height: troubleshootingLinkIcon.height
width: troubleshootingLinkIcon.width + troubleshootingLabel.width + UM.Theme.getSize("thin_margin").width
UM.RecolorImage
UM.ColorImage
{
id: troubleshootingLinkIcon
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")
}
UM.RecolorImage
UM.ColorImage
{
id: rightIcon
anchors.right: parent.right

View file

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

View file

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

View file

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