fix themes that don't have hint-bar-size element

Change-Id: Ic2623d66223628b992650084de451ac288467157
This commit is contained in:
Marco Martin 2015-03-31 21:43:05 +02:00
parent e37576f8d8
commit 67a64e8763

View File

@ -39,6 +39,12 @@ ProgressBarStyle {
onRepaintNeeded: {
preferredWidth = barSvg.elementSize("hint-bar-size").width
preferredHeight = barSvg.elementSize("hint-bar-size").height
if (preferredWidth == 0) {
preferredWidth = barSvg.elementSize("bar-inactive-left").width + barSvg.elementSize("bar-inactive-right").width
}
if (preferredHeight == 0) {
preferredHeight = barSvg.elementSize("bar-inactive-top").width + barSvg.elementSize("bar-inactive-bottom").width
}
}
}