diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-05-06 04:14:36 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-05-06 04:14:36 (GMT) |
commit | 2dfa4fbcdc901b8cdd8df0087ecf5e3fa2523603 (patch) | |
tree | 04970cad9ef9d03658137521b5277b26d9bd2c9a /examples/declarative/scrollbar/ScrollBar.qml | |
parent | e909d9a200c7a75dc23542f4603ce86fdc135bab (diff) | |
download | Qt-2dfa4fbcdc901b8cdd8df0087ecf5e3fa2523603.zip Qt-2dfa4fbcdc901b8cdd8df0087ecf5e3fa2523603.tar.gz Qt-2dfa4fbcdc901b8cdd8df0087ecf5e3fa2523603.tar.bz2 |
More cleanup
Diffstat (limited to 'examples/declarative/scrollbar/ScrollBar.qml')
-rw-r--r-- | examples/declarative/scrollbar/ScrollBar.qml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml index 5433156..c628a20 100644 --- a/examples/declarative/scrollbar/ScrollBar.qml +++ b/examples/declarative/scrollbar/ScrollBar.qml @@ -7,26 +7,26 @@ Item { // position and pageSize are in the range 0.0 - 1.0. They are relative to the // height of the page, i.e. a pageSize of 0.5 means that you can see 50% // of the height of the view. - // orientation can be either 'Vertical' or 'Horizontal' + // orientation can be either Qt.Vertical or Qt.Horizontal property real position property real pageSize - property variant orientation : "Vertical" + property variant orientation : Qt.Vertical // A light, semi-transparent background Rectangle { id: background anchors.fill: parent - radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1) + radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1) color: "white" opacity: 0.3 } // Size the bar to the required size, depending upon the orientation. Rectangle { - 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) - radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1) + x: orientation == Qt.Vertical ? 1 : (scrollBar.position * (scrollBar.width-2) + 1) + y: orientation == Qt.Vertical ? (scrollBar.position * (scrollBar.height-2) + 1) : 1 + width: orientation == Qt.Vertical ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2)) + height: orientation == Qt.Vertical ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2) + radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1) color: "black" opacity: 0.7 } |