Opaque Button Images Color Themselves Correctly

This commit is contained in:
Sarah Jamie Lewis 2020-11-19 16:09:04 -08:00
parent 98aef15bc2
commit 71203b7b8b
1 changed files with 12 additions and 1 deletions

View File

@ -40,12 +40,23 @@ 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
font.family: Fonts.applicationFontRegular.name