diff -up Uranium-5.3.0/UM/Qt/qml/UM/qmldir.qt65 Uranium-5.3.0/UM/Qt/qml/UM/qmldir --- Uranium-5.3.0/UM/Qt/qml/UM/qmldir.qt65 2023-05-22 11:48:10.779310352 -0400 +++ Uranium-5.3.0/UM/Qt/qml/UM/qmldir 2023-05-22 11:48:31.404560978 -0400 @@ -1,6 +1,7 @@ module Uranium ApplicationMenu 1.0 ApplicationMenu.qml +RecolorImage 1.0 RecolorImage.qml MessageStack 1.0 MessageStack.qml Dialog 1.0 Dialog.qml diff -up Uranium-5.3.0/UM/Qt/qml/UM/RecolorImage.qml.qt65 Uranium-5.3.0/UM/Qt/qml/UM/RecolorImage.qml --- Uranium-5.3.0/UM/Qt/qml/UM/RecolorImage.qml.qt65 2023-05-22 11:46:42.419236608 -0400 +++ Uranium-5.3.0/UM/Qt/qml/UM/RecolorImage.qml 2023-05-22 11:47:01.327466370 -0400 @@ -0,0 +1,35 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.1 +import UM 1.3 as UM + +Item +{ + id: base; + + property alias source: img.source + property alias color: shader.color + property alias sourceSize: img.sourceSize + + Image + { + id: img + anchors.fill: parent + visible: false + sourceSize.width: parent.width + sourceSize.height: parent.height + } + + ShaderEffect + { + id: shader + anchors.fill: parent + + property variant src: img + property color color: "#fff" + + vertexShader: Resources.getPath(Resources.Shaders, "recolor_image.vert.qsb") + fragmentShader: Resources.getPath(Resources.Shaders, "recolor_image.frag.qsb") + } +} diff -up Uranium-5.3.0/UM/Qt/qml/UM/SimpleButton.qml.qt65 Uranium-5.3.0/UM/Qt/qml/UM/SimpleButton.qml --- Uranium-5.3.0/UM/Qt/qml/UM/SimpleButton.qml.qt65 2023-05-22 11:47:45.530003515 -0400 +++ Uranium-5.3.0/UM/Qt/qml/UM/SimpleButton.qml 2023-05-22 11:47:53.582101367 -0400 @@ -27,12 +27,13 @@ MouseArea radius: 0 } - ColorImage + RecolorImage { id: image anchors.fill: parent anchors.margins: base.iconMargin + sourceSize.height: width color: base.containsMouse ? base.hoverColor : base.color