Merge lp:~kalikiana/ubuntu-ui-toolkit/feedback into lp:ubuntu-ui-toolkit

Proposed by Cris Dywan
Status: Merged
Approved by: Francis Ginther
Approved revision: 734
Merged at revision: 785
Proposed branch: lp:~kalikiana/ubuntu-ui-toolkit/feedback
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 64 lines (+15/-0)
2 files modified
debian/control (+2/-0)
modules/Ubuntu/Components/AbstractButton.qml (+13/-0)
To merge this branch: bzr merge lp:~kalikiana/ubuntu-ui-toolkit/feedback
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Loïc Molinari (community) Approve
Review via email: mp+183467@code.launchpad.net

Commit message

Add haptic feedback to AbstractButton

Description of the change

This feature depends on the availability of a feedback plugin - see bug 1214404 for that.
Be sure to install qtdeclarative5-qtfeedback-plugin when testing.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Loïc Molinari (loic.molinari) wrote :

Good!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

A necessary job change caused the mako failure, re-approving.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-08-28 20:35:28 +0000
3+++ debian/control 2013-09-02 13:45:12 +0000
4@@ -20,6 +20,7 @@
5 qtdeclarative5-qtquick2-plugin,
6 qtdeclarative5-test-plugin,
7 qtdeclarative5-window-plugin,
8+ qtdeclarative5-qtfeedback-plugin,
9 qtdeclarative5-unity-action-plugin,
10 devscripts,
11 libqt5organizer5,
12@@ -39,6 +40,7 @@
13 libqt5svg5,
14 qtdeclarative5-qtquick2-plugin,
15 qtdeclarative5-window-plugin,
16+ qtdeclarative5-qtfeedback-plugin,
17 qtdeclarative5-unity-action-plugin,
18 ttf-ubuntu-font-family,
19 ubuntu-ui-toolkit-theme,
20
21=== modified file 'modules/Ubuntu/Components/AbstractButton.qml'
22--- modules/Ubuntu/Components/AbstractButton.qml 2013-08-07 12:09:15 +0000
23+++ modules/Ubuntu/Components/AbstractButton.qml 2013-09-02 13:45:12 +0000
24@@ -15,6 +15,7 @@
25 */
26
27 import QtQuick 2.0
28+import QtFeedback 5.0
29
30 /*!
31 \qmlabstract AbstractButton
32@@ -26,6 +27,7 @@
33
34 This class defines the behavior of the button: it defines the MouseArea
35 and the states.
36+ All components deriving from this class support haptic feedback out of the box.
37 */
38 ActionItem {
39 id: button
40@@ -80,6 +82,16 @@
41 */
42 property alias __mouseArea: mouseArea
43
44+ HapticsEffect {
45+ id: pressEffect
46+ attackIntensity: 0.0
47+ attackTime: 250
48+ intensity: 1.0
49+ duration: 100
50+ fadeTime: 250
51+ fadeIntensity: 0.0
52+ }
53+
54 MouseArea {
55 id: mouseArea
56 anchors.fill: parent
57@@ -89,6 +101,7 @@
58
59 onClicked: {
60 if (button.__acceptEvents) {
61+ pressEffect.start()
62 button.clicked()
63 }
64 }

Subscribers

People subscribed via source and target branches

to status/vote changes: