mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 16:44:04 +02:00
tablet-ui: button icon images now work with http urls.
This commit is contained in:
parent
2fc6b4b0af
commit
8f362861eb
1 changed files with 10 additions and 2 deletions
|
@ -75,6 +75,14 @@ Item {
|
|||
source: buttonOutline
|
||||
}
|
||||
|
||||
function urlHelper(src) {
|
||||
if (src.match(/\bhttp/)) {
|
||||
return src;
|
||||
} else {
|
||||
return "../../../" + src;
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: icon
|
||||
width: 50
|
||||
|
@ -84,7 +92,7 @@ Item {
|
|||
anchors.bottomMargin: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
fillMode: Image.Stretch
|
||||
source: "../../../" + tabletButton.icon
|
||||
source: tabletButton.urlHelper(tabletButton.icon)
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
|
@ -185,7 +193,7 @@ Item {
|
|||
|
||||
PropertyChanges {
|
||||
target: icon
|
||||
source: "../../../" + tabletButton.activeIcon
|
||||
source: tabletButton.urlHelper(tabletButton.activeIcon)
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
|
Loading…
Reference in a new issue