Fix some ProgressBar visual glitches

Make sure the visualization takes all the available space
Update the visualization elements whenever the background and the value change

REVIEW: 105966
This commit is contained in:
Aleix Pol 2012-08-10 18:16:26 +02:00
parent 96e436f641
commit b52080ff78

View File

@ -132,9 +132,8 @@ Item {
}
QPixmapItem {
id: backgroundPixmapItem
fillMode: QPixmapItem.Tile
width: Math.floor(parent.width/(height/1.6))*Math.floor(height/1.6)
height: parent.height
anchors.fill: parent
onWidthChanged: resizeTimer.restart()
onHeightChanged: resizeTimer.restart()
}
@ -142,11 +141,12 @@ Item {
QPixmapItem {
id: barPixmapItem
fillMode: QPixmapItem.Tile
fillMode: contents._isVertical ? QPixmapItem.TileVertically : QPixmapItem.TileHorizontally
width: indeterminate ? Math.floor(height/1.6)*2 : range.position
height: contents.height
visible: indeterminate || value > 0
onWidthChanged: resizeTimer.restart()
SequentialAnimation {
id: indeterminateAnimation