From b52080ff78fd6169805e1b4b6831a03f775db568 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 10 Aug 2012 18:16:26 +0200 Subject: [PATCH] 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 --- declarativeimports/plasmacomponents/qml/ProgressBar.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/ProgressBar.qml b/declarativeimports/plasmacomponents/qml/ProgressBar.qml index 67805caf0..f9bf95367 100644 --- a/declarativeimports/plasmacomponents/qml/ProgressBar.qml +++ b/declarativeimports/plasmacomponents/qml/ProgressBar.qml @@ -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