summaryrefslogtreecommitdiffstats
path: root/examples/declarative/scrollbar
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-07-23 04:09:32 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-07-23 04:09:32 (GMT)
commitfe3c4ac63bf4879534caf32419b5d481a7c6113a (patch)
tree1a90ddbcaa1624eee2b4b4e19289b2cb2d73596f /examples/declarative/scrollbar
parent4f35294d737d9059398b2c8f714c8e0ea37079ed (diff)
downloadQt-fe3c4ac63bf4879534caf32419b5d481a7c6113a.zip
Qt-fe3c4ac63bf4879534caf32419b5d481a7c6113a.tar.gz
Qt-fe3c4ac63bf4879534caf32419b5d481a7c6113a.tar.bz2
make scrollbars look nice again.
Diffstat (limited to 'examples/declarative/scrollbar')
-rw-r--r--examples/declarative/scrollbar/ScrollBar.qml14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml
index 8020d62..f329fbe 100644
--- a/examples/declarative/scrollbar/ScrollBar.qml
+++ b/examples/declarative/scrollbar/ScrollBar.qml
@@ -12,18 +12,18 @@ Item {
// A light, semi-transparent background
Rect {
id: Background
- radius: orientation == 'Vertical' ? (width/2) : (height/2)
+ radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
color: "white"; opacity: 0.3
anchors.fill: parent
}
// Size the bar to the required size, depending upon the orientation.
Rect {
- opacity: 0.6
+ opacity: 0.7
color: "black"
- radius: orientation == 'Vertical' ? (width/2) : (height/2)
- x: orientation == 'Vertical' ? 2 : (ScrollBar.position * (ScrollBar.width-4) + 2)
- y: orientation == 'Vertical' ? (ScrollBar.position * (ScrollBar.height-4) + 2) : 2
- width: orientation == 'Vertical' ? (parent.width-4) : (ScrollBar.pageSize * (ScrollBar.width-4))
- height: orientation == 'Vertical' ? (ScrollBar.pageSize * (ScrollBar.height-4)) : (parent.height-4)
+ radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ x: orientation == 'Vertical' ? 1 : (ScrollBar.position * (ScrollBar.width-2) + 1)
+ y: orientation == 'Vertical' ? (ScrollBar.position * (ScrollBar.height-2) + 1) : 1
+ width: orientation == 'Vertical' ? (parent.width-2) : (ScrollBar.pageSize * (ScrollBar.width-2))
+ height: orientation == 'Vertical' ? (ScrollBar.pageSize * (ScrollBar.height-2)) : (parent.height-2)
}
}