summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Olszak <olszak.tomasz@gmail.com>2013-08-11 22:10:39 +0000
committerTomasz Olszak <olszak.tomasz@gmail.com>2013-08-12 08:31:36 +0200
commite904afc0b3050ee234595e43c448f2cb093cdf1d (patch)
treecaa165002ad3fdb0bca75ebd68033f1c23e34d31
parent25b67847548ac459bb2f67152094824e3f91ed2b (diff)
downloadqtquickcontrols-tizen-e904afc0b3050ee234595e43c448f2cb093cdf1d.tar.gz
qtquickcontrols-tizen-e904afc0b3050ee234595e43c448f2cb093cdf1d.tar.bz2
qtquickcontrols-tizen-e904afc0b3050ee234595e43c448f2cb093cdf1d.zip
[SliderStyle] Fixed handle position.
Change-Id: I8d479dde6abeb139b7a854c23624fd5741997fb9 Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
-rw-r--r--src/styles/SliderStyle.qml16
-rw-r--r--src/styles/images/720x1280/00_slider_popup_bg.9.sci4
2 files changed, 6 insertions, 14 deletions
diff --git a/src/styles/SliderStyle.qml b/src/styles/SliderStyle.qml
index a9cd54e..759a896 100644
--- a/src/styles/SliderStyle.qml
+++ b/src/styles/SliderStyle.qml
@@ -29,23 +29,16 @@ SliderStyle {
implicitWidth: bg.implicitWidth
implicitHeight: bg.implicitHeight
- Component.onCompleted: {
- control.onPressedChanged.connect(updatePos)
- control.onValueChanged.connect(updatePos)
- }
- property point globalPosition
- property int globalX
- property int globalY
- function updatePos() {
+ property point globalPosition: updatePos(parent.x,control.pressed)
+ function updatePos(parentX,controlPressed) {
var pt = handleItem.mapFromItem(floater.parent,x,y)
- globalPosition = Qt.point(pt.x,pt.y)
+ return Qt.point(pt.x,pt.y)
}
-
Floater {
id:floater
content: TizenBorderImage {
- implicitWidth: Math.max(txt.contentWidth+txt.anchors.margins, TizenConfig.slider.handle.overlay.width)
+ implicitWidth: Math.max(txt.contentWidth, TizenConfig.slider.handle.overlay.width)
implicitHeight: TizenConfig.slider.handle.overlay.height
source: TizenConfig.slider.handle.overlay.source
backgroundColor: TizenConfig.slider.handle.overlay.backgroundColor
@@ -62,7 +55,6 @@ SliderStyle {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: control.value
-
}
}
visible:control.pressed
diff --git a/src/styles/images/720x1280/00_slider_popup_bg.9.sci b/src/styles/images/720x1280/00_slider_popup_bg.9.sci
index 2677b78..46826e9 100644
--- a/src/styles/images/720x1280/00_slider_popup_bg.9.sci
+++ b/src/styles/images/720x1280/00_slider_popup_bg.9.sci
@@ -1,5 +1,5 @@
-border.left: 34
-border.right: 55
+border.left: 10
+border.right:10
border.top: 37
border.bottom: 60
source: 00_slider_popup_bg.9.png