summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriano Rezende <adriano.1.rezende@nokia.com>2012-07-05 14:52:39 +0200
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2012-07-05 15:21:35 +0200
commitb5626681d8cd0e48e53b2699de69887ef3e8cfcf (patch)
tree84a3230afab255b7978b410d1000680729cfea3b
parent2596636d84192c26964e7fc6e833f962165c4c9f (diff)
downloadqtquickcontrols-b5626681d8cd0e48e53b2699de69887ef3e8cfcf.tar.gz
Remove dummy StyleItem inside Slider
We should not bind the size to this dummy item, since the delegate can be changed leading to a wrong implicit size in that case. Change-Id: Ibeff637dba1ea485abdb6801685f5262a3843ca7 Reviewed-by: Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
-rw-r--r--components/Slider.qml13
1 files changed, 4 insertions, 9 deletions
diff --git a/components/Slider.qml b/components/Slider.qml
index 6c106f78..6cb8fba9 100644
--- a/components/Slider.qml
+++ b/components/Slider.qml
@@ -72,15 +72,8 @@ Item {
return Math.round(v);
}
- StyleItem {
- id:buttonitem
- elementType: "slider"
- contentWidth:23
- contentHeight:23
- }
-
- implicitWidth: orientation === Qt.Horizontal ? 200 : buttonitem.implicitHeight
- implicitHeight: orientation === Qt.Horizontal ? buttonitem.implicitHeight : 200
+ implicitWidth: orientation === Qt.Horizontal ? 200 : loader.item.implicitHeight
+ implicitHeight: orientation === Qt.Horizontal ? loader.item.implicitHeight : 200
property string styleHint;
@@ -88,6 +81,8 @@ Item {
anchors.fill:parent
elementType: "slider"
sunken: pressed
+ contentWidth: 23
+ contentHeight: 23
maximum: slider.maximumValue*100
minimum: slider.minimumValue*100
step: slider.stepSize*100