Merge lp:~3v1n0/component-store/radial-expand-angle into lp:component-store

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merged at revision: 47
Proposed branch: lp:~3v1n0/component-store/radial-expand-angle
Merge into: lp:component-store
Diff against target: 91 lines (+25/-3) (has conflicts)
4 files modified
ComponentStore/RadialBottomEdge/RadialBottomEdge.qml (+6/-2)
ComponentStore/RadialBottomEdge/ubuntu_component_store.json (+1/-1)
docs/_components/radialbottomedge.rst (+11/-0)
docs/release.rst (+7/-0)
Text conflict in docs/release.rst
To merge this branch: bzr merge lp:~3v1n0/component-store/radial-expand-angle
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) (community) Approve
Nekhelesh Ramananthan Needs Fixing
Review via email: mp+252529@code.launchpad.net

Commit message

RadialBottomEdge: make possible to expand actions in a narrower angle

And update expandedPosition depending on this value

Description of the change

I'd like to dispose actions using a narower expand-angle when I've just few actions to add... Changing expandAngle to something minor to 360, you'd be able to dispose actions using a smaller area.

Here's what happens adding 3 or 4 actions with a 180° expandAngle: http://imgur.com/a/aLqVU

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Thanks Marco for the patch. The component code looks good. The documentation needs to be updated. I have done that for you at https://code.launchpad.net/~nik90/component-store/update-radial-docs/+merge/253622. Please merge that into this branch and then I can top-approve this MP.

review: Needs Fixing
47. By Marco Trevisan (Treviño)

Merging with nick90's docs

Thanks!

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Merged, thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ComponentStore/RadialBottomEdge/RadialBottomEdge.qml'
--- ComponentStore/RadialBottomEdge/RadialBottomEdge.qml 2014-11-15 14:50:47 +0000
+++ ComponentStore/RadialBottomEdge/RadialBottomEdge.qml 2015-03-20 10:21:42 +0000
@@ -11,7 +11,8 @@
11 property color hintIconColor: UbuntuColors.coolGrey11 property color hintIconColor: UbuntuColors.coolGrey
12 property bool bottomEdgeEnabled: true12 property bool bottomEdgeEnabled: true
1313
14 property real expandedPosition: 0.6 * height14 property int expandAngle: 360
15 property real expandedPosition: (0.85 - 0.25 * expandAngle/360) * height
15 property real collapsedPosition: height - hintSize/216 property real collapsedPosition: height - hintSize/2
1617
17 property list<RadialAction> actions18 property list<RadialAction> actions
@@ -60,10 +61,13 @@
6061
61 Repeater {62 Repeater {
62 id: actionList63 id: actionList
64 readonly property real itemSpace: bottomEdge.expandAngle/actionList.count;
65 readonly property real substractAngle: (bottomEdge.expandAngle == 360 || !actionList.count) ?
66 0 : (actionList.count-1)/2 * itemSpace
63 model: actions67 model: actions
64 delegate: Rectangle {68 delegate: Rectangle {
65 id: actionDelegate69 id: actionDelegate
66 readonly property real radAngle: (index % actionList.count * (360/actionList.count)) * Math.PI / 18070 readonly property real radAngle: (index % actionList.count * actionList.itemSpace - actionList.substractAngle) * Math.PI / 180
67 property real distance: bottomEdgeHint.actionListDistance71 property real distance: bottomEdgeHint.actionListDistance
68 z: -172 z: -1
69 width: actionButtonSize73 width: actionButtonSize
7074
=== modified file 'ComponentStore/RadialBottomEdge/ubuntu_component_store.json'
--- ComponentStore/RadialBottomEdge/ubuntu_component_store.json 2015-01-04 16:15:59 +0000
+++ ComponentStore/RadialBottomEdge/ubuntu_component_store.json 2015-03-20 10:21:42 +0000
@@ -1,6 +1,6 @@
1{1{
2 "name": "RadialBottomEdge",2 "name": "RadialBottomEdge",
3 "description": "This component provides a unique way to show actions buttons using the bottom edge. It allows app developers to decide how many actions they want to show and customize it to their liking.",3 "description": "This component provides a unique way to show actions buttons using the bottom edge. It allows app developers to decide how many actions they want to show and customize it to their liking.",
4 "version": "1.0",4 "version": "1.1",
5 "documentation_url": "http://ubuntu-component-store.readthedocs.org/en/latest/_components/radialbottomedge.html"5 "documentation_url": "http://ubuntu-component-store.readthedocs.org/en/latest/_components/radialbottomedge.html"
6}6}
77
=== modified file 'docs/_components/radialbottomedge.rst'
--- docs/_components/radialbottomedge.rst 2014-11-15 14:59:11 +0000
+++ docs/_components/radialbottomedge.rst 2015-03-20 10:21:42 +0000
@@ -74,6 +74,7 @@
74- :ref:`actions`: RadialAction <list> 74- :ref:`actions`: RadialAction <list>
75- :ref:`actionButtonSize`: int75- :ref:`actionButtonSize`: int
76- :ref:`actionButtonDistance`: int76- :ref:`actionButtonDistance`: int
77- :ref:`expandAngle`: int (defaults to 360 deg)
7778
78.. note:: All properties except for *hintIconSource* have well defined defaults. As a developer, you could choose to go with the defaults or change them to your liking.79.. note:: All properties except for *hintIconSource* have well defined defaults. As a developer, you could choose to go with the defaults or change them to your liking.
7980
@@ -156,3 +157,13 @@
156^^^^^^^^^^^^^^^^^^^^157^^^^^^^^^^^^^^^^^^^^
157158
158The distance (separation) between the action buttons and the center of the radial menu.159The distance (separation) between the action buttons and the center of the radial menu.
160
161.. _expandAngle:
162
163expandAngle
164^^^^^^^^^^^
165
166The expand angle defines the spread angle. By default, it is set to 360 degrees which places the buttons
167in a full circle pattern. If it was set to 180 degrees, then the buttons would follow a semi-circle
168pattern.
169
159170
=== modified file 'docs/release.rst'
--- docs/release.rst 2015-03-13 11:18:34 +0000
+++ docs/release.rst 2015-03-20 10:21:42 +0000
@@ -1,6 +1,7 @@
1Release Notes1Release Notes
2=============2=============
33
4<<<<<<< TREE
4**13th March 2015**5**13th March 2015**
56
6* Improved ListItemWithActions components by adding the following new properties,7* Improved ListItemWithActions components by adding the following new properties,
@@ -9,6 +10,12 @@
9 * showUnderscore - Shows an underscore under the active right side action10 * showUnderscore - Shows an underscore under the active right side action
10 * enableHaptics - enables haptic effects on actions triggered11 * enableHaptics - enables haptic effects on actions triggered
1112
13=======
14**11th March 2015**
15
16* Added expandAngle property to radial bottom edge component to allow developers to specify the spread angle.
17
18>>>>>>> MERGE-SOURCE
12**3rd March 2015**19**3rd March 2015**
1320
14* Added WelcomeWizard component21* Added WelcomeWizard component

Subscribers

People subscribed via source and target branches