Merge lp:~nik90/component-store/add-haptic-shadow-radial into lp:component-store

Proposed by Nekhelesh Ramananthan
Status: Merged
Merged at revision: 48
Proposed branch: lp:~nik90/component-store/add-haptic-shadow-radial
Merge into: lp:component-store
Diff against target: 146 lines (+41/-2)
5 files modified
ComponentStore/RadialBottomEdge/RadialAction.qml (+1/-0)
ComponentStore/RadialBottomEdge/RadialBottomEdge.qml (+29/-1)
GallerySRC/RadialBottomEdgeWidget.qml (+2/-0)
docs/_components/radialbottomedge.rst (+4/-1)
docs/release.rst (+5/-0)
To merge this branch: bzr merge lp:~nik90/component-store/add-haptic-shadow-radial
Reviewer Review Type Date Requested Status
Ubuntu Touch Community Dev Pending
Review via email: mp+253832@code.launchpad.net

Description of the change

Added haptic feedback to radial action buttons. Also added a drop shadow to the radial bottom edge hint.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ComponentStore/RadialBottomEdge/RadialAction.qml'
2--- ComponentStore/RadialBottomEdge/RadialAction.qml 2014-11-15 13:52:44 +0000
3+++ ComponentStore/RadialBottomEdge/RadialAction.qml 2015-03-23 14:34:47 +0000
4@@ -5,4 +5,5 @@
5 property string iconName: "add"
6 property color iconColor: "Black"
7 property color backgroundColor: "White"
8+ property bool enabled: true
9 }
10
11=== modified file 'ComponentStore/RadialBottomEdge/RadialBottomEdge.qml'
12--- ComponentStore/RadialBottomEdge/RadialBottomEdge.qml 2015-03-11 02:23:25 +0000
13+++ ComponentStore/RadialBottomEdge/RadialBottomEdge.qml 2015-03-23 14:34:47 +0000
14@@ -1,4 +1,5 @@
15-import QtQuick 2.0
16+import QtQuick 2.2
17+import QtFeedback 5.0
18 import Ubuntu.Components 1.1
19
20 Item {
21@@ -21,6 +22,16 @@
22
23 anchors.fill: parent
24
25+ HapticsEffect {
26+ id: clickEffect
27+ attackIntensity: 0.0
28+ attackTime: 50
29+ intensity: 1.0
30+ duration: 10
31+ fadeTime: 50
32+ fadeIntensity: 0.0
33+ }
34+
35 Rectangle {
36 id: bgVisual
37
38@@ -42,6 +53,20 @@
39 anchors.horizontalCenter: parent.horizontalCenter
40 y: collapsedPosition
41 z: parent.z + 1
42+
43+ Rectangle {
44+ id: dropShadow
45+ width: parent.width
46+ height: parent.height
47+ border.color: "#B3B3B3"
48+ color: "Transparent"
49+ radius: parent.radius
50+ z: -1
51+ anchors {
52+ centerIn: parent
53+ verticalCenterOffset: units.gu(-0.3)
54+ }
55+ }
56
57 Icon {
58 id: hintIcon
59@@ -75,6 +100,7 @@
60 radius: width/2
61 anchors.centerIn: parent
62 color: modelData.backgroundColor
63+ opacity: modelData.enabled ? 1.0 : 0.7
64 transform: Translate {
65 x: distance * Math.sin(radAngle)
66 y: -distance * Math.cos(radAngle)
67@@ -89,8 +115,10 @@
68 }
69
70 MouseArea {
71+ enabled: modelData.enabled
72 anchors.fill: parent
73 onClicked: {
74+ clickEffect.start()
75 bottomEdgeHint.state = "collapsed"
76 modelData.triggered(null)
77 }
78
79=== modified file 'GallerySRC/RadialBottomEdgeWidget.qml'
80--- GallerySRC/RadialBottomEdgeWidget.qml 2014-11-15 14:50:47 +0000
81+++ GallerySRC/RadialBottomEdgeWidget.qml 2015-03-23 14:34:47 +0000
82@@ -22,12 +22,14 @@
83 RadialAction {
84 iconName: "settings"
85 iconColor: UbuntuColors.coolGrey
86+ enabled: false
87 },
88
89 RadialAction {
90 iconName: "save"
91 iconColor: "white"
92 backgroundColor: UbuntuColors.green
93+ enabled: false
94 onTriggered: console.log("save")
95 },
96
97
98=== modified file 'docs/_components/radialbottomedge.rst'
99--- docs/_components/radialbottomedge.rst 2015-03-20 01:33:25 +0000
100+++ docs/_components/radialbottomedge.rst 2015-03-23 14:34:47 +0000
101@@ -35,6 +35,7 @@
102 RadialAction {
103 iconName: "save"
104 iconColor: "white"
105+ enabled: false
106 backgroundColor: UbuntuColors.green
107 onTriggered: console.log("save")
108 },
109@@ -42,6 +43,7 @@
110 RadialAction {
111 iconName: "delete"
112 iconColor: "white"
113+ enabled: false
114 backgroundColor: UbuntuColors.red
115 onTriggered: console.log("delete")
116 },
117@@ -133,11 +135,12 @@
118
119 This property is used to define a list of actions to be shown in the radial menu. The list takes
120 a **RadialAction** which inherits **Action**. A RadialAction adds 3 properties on top of what Action
121-provides which are iconName, iconColor and backgroundColor. ::
122+provides which are iconName, iconColor, enabled and backgroundColor. ::
123
124 RadialAction {
125 iconName: "add"
126 iconColor: "white"
127+ enabled: false
128 backgroundColor: "green"
129 }
130
131
132=== modified file 'docs/release.rst'
133--- docs/release.rst 2015-03-20 12:17:50 +0000
134+++ docs/release.rst 2015-03-23 14:34:47 +0000
135@@ -1,6 +1,11 @@
136 Release Notes
137 =============
138
139+**23rd March 2015**
140+
141+* Added haptic feedback to radial action buttons
142+* Added drop shadow to radial bottom edge hint
143+
144 **13th March 2015**
145
146 * Improved ListItemWithActions components by adding the following new properties,

Subscribers

People subscribed via source and target branches