Image {
id: icon
source: "image.png"
visible: true
Colorize {
anchors.fill: parent
source: icon
hue: 0.1 - (158 - icon.width) / 58 * 0.1 //色调
saturation: 1 //饱和度
lightness: -0.2 //亮度
}
SequentialAnimation {
id: iconAnimation
property real widthEnd: 100
property real heightEnd: 90
ParallelAnimation {
NumberAnimation { target: icon; property: "width"; to: iconAnimation.widthEnd; duration: 300 }
NumberAnimation { target: icon; property: "height"; to: iconAnimation.heightEnd; duration: 300 }
}
}
}