diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-29 19:58:29 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-29 19:58:29 -0800 |
commit | 9d6225831650dd9c6331763d29b392bc2741ae4e (patch) | |
tree | de25275781c4b15bf11feb1323bda6d353aa3909 /qt-mobile/qml/mobilecomponents/private | |
parent | bb1803986afed7d1f626f941417acae6b3e51830 (diff) | |
parent | f8fb9181b2e95f76bb1170d2cd7c7bf920a9c414 (diff) | |
download | subsurface-9d6225831650dd9c6331763d29b392bc2741ae4e.tar.gz |
Merge branch 'mobilecomponents' of github.com:sebasje/subsurface
Diffstat (limited to 'qt-mobile/qml/mobilecomponents/private')
-rw-r--r-- | qt-mobile/qml/mobilecomponents/private/ActionButton.qml | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/qt-mobile/qml/mobilecomponents/private/ActionButton.qml b/qt-mobile/qml/mobilecomponents/private/ActionButton.qml index bfc8c5875..4dbea98b8 100644 --- a/qt-mobile/qml/mobilecomponents/private/ActionButton.qml +++ b/qt-mobile/qml/mobilecomponents/private/ActionButton.qml @@ -35,6 +35,15 @@ MouseArea { minimumX: contextDrawer ? 0 : parent.width/2 - width/2 maximumX: globalDrawer ? parent.width : parent.width/2 - width/2 } + function toggle() { + showAnimation.running = false; + if (transform[0].y < button.height) { + showAnimation.to = button.height; + } else { + showAnimation.to = 0; + } + showAnimation.running = true; + } transform: Translate {} onReleased: { @@ -88,6 +97,13 @@ MouseArea { } } + NumberAnimation { + id: showAnimation + target: button.transform[0] + properties: "y" + duration: Units.longDuration + easing.type: Easing.InOutQuad + } Item { id: background anchors { @@ -140,8 +156,8 @@ MouseArea { DropShadow { anchors.fill: background horizontalOffset: 0 - verticalOffset: Units.smallSpacing/2 - radius: Units.gridUnit / 2.4 + verticalOffset: Units.smallSpacing/3 + radius: Units.gridUnit / 3.5 samples: 16 color: button.pressed ? "transparent" : Qt.rgba(0, 0, 0, 0.5) source: background |