Opaque Button Images Color Themselves Correctly
This commit is contained in:
parent
98aef15bc2
commit
71203b7b8b
13
Button.qml
13
Button.qml
|
@ -40,11 +40,22 @@ Rectangle {
|
|||
|
||||
Image {
|
||||
id: ico
|
||||
source: icon!="" ? gcd.assetPath + "fontawesome/"+icon+".webp" : "";
|
||||
source: icon!="" ? gcd.assetPath + "core/"+icon+".webp" : "";
|
||||
visible: icon != ""
|
||||
height: button.height / 2
|
||||
sourceSize.height: button.height / 2
|
||||
|
||||
ColorOverlay{
|
||||
id: iconColorOverlay
|
||||
color: textColor
|
||||
anchors.fill: ico
|
||||
source: ico
|
||||
antialiasing: true
|
||||
smooth: true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Label {
|
||||
id: buttonText
|
||||
|
|
Loading…
Reference in New Issue