Merge lp:~ogra/ubuntu-ui-toolkit/improve-haptics into lp:ubuntu-ui-toolkit

Proposed by Oliver Grawert
Status: Superseded
Proposed branch: lp:~ogra/ubuntu-ui-toolkit/improve-haptics
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 175 lines (+38/-23)
10 files modified
modules/Ubuntu/Components/AbstractButton.qml (+3/-3)
modules/Ubuntu/Components/Popups/internalPopupUtils.js (+1/-1)
modules/Ubuntu/Components/TextArea.qml (+1/-1)
modules/Ubuntu/Components/TextCursor.qml (+5/-3)
modules/Ubuntu/Components/TextField.qml (+4/-5)
modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml (+15/-7)
modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/TextSelectionEndCursorStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/TextSelectionStartCursorStyle.qml (+1/-1)
tests/resources/inputs/TextInputs.qml (+6/-0)
To merge this branch: bzr merge lp:~ogra/ubuntu-ui-toolkit/improve-haptics
Reviewer Review Type Date Requested Status
Cris Dywan needs-to-target-staging Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+218466@code.launchpad.net

This proposal has been superseded by a proposal from 2014-05-09.

Description of the change

Improve the haptics button feedback to be more like other on mobile architectures (less rattling, more realistic)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1037. By Zsombor Egri

Text input caret handler visuals and functionality. Fixes: https://bugs.launchpad.net/bugs/1183257.

Approved by PS Jenkins bot, Christian Dywan.

1038. By Zsombor Egri

PageUp/PageDown fix in text inputs. Fixes: https://bugs.launchpad.net/bugs/1180188.

Approved by PS Jenkins bot, Christian Dywan.

1039. By Cris Dywan

Export to load modules from source and allow arguments.

Approved by PS Jenkins bot, Zsombor Egri.

Revision history for this message
Cris Dywan (kalikiana) wrote :

The tweaks are sensible, though it's hard to accurately compare it feels much closer to the competition than before. Maybe a tad too weak… but acceptable. The real solution will have to be in the form of system settings for it anyway.

review: Approve
Revision history for this message
Cris Dywan (kalikiana) wrote :

One formality, please merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/staging and target the branch to merge into that branch.

Revision history for this message
Cris Dywan (kalikiana) :
review: Approve (needs-to-target-staging)
1040. By Tim Peeters

Fix the positioning of a popover pointer on a small screen in portrait mode. Fixes: https://bugs.launchpad.net/bugs/1208833.

Approved by PS Jenkins bot, Christian Dywan.

Revision history for this message
Oliver Grawert (ogra) wrote :

will do ... on a sidenote this should also help with bug 1290201

1041. By Zsombor Egri

Text input caret positioning fix for the cases when TextField has overlay primary items and when RTL is enabled.

Approved by PS Jenkins bot, Zoltan Balogh.

1042. By Oliver Grawert

Adjust Haptic feedback for buttons to be more in sync with android and IOS behavior, re-target staging branch

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/AbstractButton.qml'
2--- modules/Ubuntu/Components/AbstractButton.qml 2014-04-23 08:50:20 +0000
3+++ modules/Ubuntu/Components/AbstractButton.qml 2014-05-09 11:12:15 +0000
4@@ -85,10 +85,10 @@
5 HapticsEffect {
6 id: pressEffect
7 attackIntensity: 0.0
8- attackTime: 250
9+ attackTime: 50
10 intensity: 1.0
11- duration: 100
12- fadeTime: 250
13+ duration: 10
14+ fadeTime: 50
15 fadeIntensity: 0.0
16 }
17
18
19=== modified file 'modules/Ubuntu/Components/Popups/internalPopupUtils.js'
20--- modules/Ubuntu/Components/Popups/internalPopupUtils.js 2013-07-13 03:11:26 +0000
21+++ modules/Ubuntu/Components/Popups/internalPopupUtils.js 2014-05-09 11:12:15 +0000
22@@ -154,7 +154,7 @@
23 if (simplePos.checkVerticalPosition(foreground, ycoord, 0, area.height/4)) {
24 foreground.y = ycoord;
25 pointer.direction = "up";
26- pointer.y = this.above(null, callerMargins, caller);
27+ pointer.y = this.below(null, callerMargins, caller);
28 pointer.x = this.closestToHorizontalCenter(pointerTarget, pointer.horizontalMargin);
29 return;
30 }
31
32=== modified file 'modules/Ubuntu/Components/TextArea.qml'
33--- modules/Ubuntu/Components/TextArea.qml 2014-05-02 12:00:30 +0000
34+++ modules/Ubuntu/Components/TextArea.qml 2014-05-09 11:12:15 +0000
35@@ -875,7 +875,7 @@
36 input: editor
37 flickable: flicker
38 selectionModeTimeout: control.__styleInstance.selectionModeTimeout
39- frameDistance: Qt.point(internal.frameSpacing, internal.frameSpacing)
40+ frameDistance: Qt.point(flicker.x, flicker.y)
41 }
42 }
43 }
44
45=== modified file 'modules/Ubuntu/Components/TextCursor.qml'
46--- modules/Ubuntu/Components/TextCursor.qml 2014-05-06 09:20:16 +0000
47+++ modules/Ubuntu/Components/TextCursor.qml 2014-05-09 11:12:15 +0000
48@@ -199,9 +199,11 @@
49 // positions caret to the dragged position
50 function positionCaret() {
51 if (dragger.drag.active) {
52- handler.positionCaret(positionProperty,
53- dragger.thumbStartX + dragger.dragAmountX + handler.flickable.contentX,
54- dragger.thumbStartY + dragger.dragAmountY + handler.flickable.contentY);
55+ var dx = dragger.thumbStartX + dragger.dragAmountX + handler.flickable.contentX;
56+ var dy = dragger.thumbStartY + dragger.dragAmountY + handler.flickable.contentY;
57+ // consider only the x-distance because of the overlays
58+ dx -= handler.frameDistance.x;
59+ handler.positionCaret(positionProperty, dx, dy);
60 }
61 }
62 }
63
64=== modified file 'modules/Ubuntu/Components/TextField.qml'
65--- modules/Ubuntu/Components/TextField.qml 2014-05-02 12:00:30 +0000
66+++ modules/Ubuntu/Components/TextField.qml 2014-05-09 11:12:15 +0000
67@@ -1006,12 +1006,11 @@
68 flickable: flicker
69 selectionModeTimeout: control.__styleInstance.selectionModeTimeout
70 /*
71- In x direction we use 2 times the configured spacing, as we have
72- both the overlay and the Flickable aligned with margins. On y
73- direction we only use the simple spacing, the Flickable moves the
74- top downwards.
75+ In x direction we use the Flickable x position as we can have overlays
76+ which can shift the cursor caret. On y direction we only use the topMargin
77+ spacing.
78 */
79- frameDistance: Qt.point(2 * internal.spacing, internal.spacing)
80+ frameDistance: Qt.point(flicker.x, flicker.topMargin)
81 }
82 }
83 }
84
85=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml'
86--- modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2014-04-23 08:50:20 +0000
87+++ modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2014-05-09 11:12:15 +0000
88@@ -137,16 +137,24 @@
89 id: arrow
90
91 visible: bubbleShape.direction != "none"
92- property var directionToRotation: {"down": 0,
93- "up": 180,
94- "left": 90,
95- "right": -90,
96- "none": 0
97- }
98+
99+ function directionToRotation(direction) {
100+ switch (direction) {
101+ case "up":
102+ return 180;
103+ case "left":
104+ return 90;
105+ case "right":
106+ return -90;
107+ default: // "down" or "none"
108+ return 0;
109+ }
110+ }
111+
112 x: -width / 2.0
113 y: -height
114 transformOrigin: Item.Bottom
115- rotation: directionToRotation[bubbleShape.direction]
116+ rotation: directionToRotation(bubbleShape.direction)
117 source: "artwork/bubble_arrow.png"
118 }
119 }
120
121=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml'
122--- modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml 2014-05-06 09:20:16 +0000
123+++ modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml 2014-05-09 11:12:15 +0000
124@@ -75,7 +75,7 @@
125 top: parent.bottom
126 horizontalCenter: parent.horizontalCenter
127 topMargin: -units.gu(0.5)
128- horizontalCenterOffset: units.gu(0.7)
129+ horizontalCenterOffset: LayoutMirroring.enabled ? -units.gu(0.7) : units.gu(0.7)
130 }
131 }
132 }
133
134=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextSelectionEndCursorStyle.qml'
135--- modules/Ubuntu/Components/Themes/Ambiance/TextSelectionEndCursorStyle.qml 2014-05-06 09:20:16 +0000
136+++ modules/Ubuntu/Components/Themes/Ambiance/TextSelectionEndCursorStyle.qml 2014-05-09 11:12:15 +0000
137@@ -60,7 +60,7 @@
138 top: parent.bottom
139 horizontalCenter: parent.horizontalCenter
140 topMargin: -units.gu(0.5)
141- horizontalCenterOffset: units.gu(0.7)
142+ horizontalCenterOffset: LayoutMirroring.enabled ? -units.gu(0.7) : units.gu(0.7)
143 }
144 }
145 }
146
147=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextSelectionStartCursorStyle.qml'
148--- modules/Ubuntu/Components/Themes/Ambiance/TextSelectionStartCursorStyle.qml 2014-05-06 09:20:16 +0000
149+++ modules/Ubuntu/Components/Themes/Ambiance/TextSelectionStartCursorStyle.qml 2014-05-09 11:12:15 +0000
150@@ -60,7 +60,7 @@
151 top: parent.bottom
152 horizontalCenter: parent.horizontalCenter
153 topMargin: -units.gu(0.5)
154- horizontalCenterOffset: -units.gu(0.7)
155+ horizontalCenterOffset: LayoutMirroring.enabled ? -(units.gu(0.7) - caretItem.width) : units.gu(0.7)
156 }
157 }
158 }
159
160=== modified file 'tests/resources/inputs/TextInputs.qml'
161--- tests/resources/inputs/TextInputs.qml 2014-05-02 12:00:30 +0000
162+++ tests/resources/inputs/TextInputs.qml 2014-05-09 11:12:15 +0000
163@@ -48,6 +48,12 @@
164 id: field
165 objectName: "Standard"
166 width: units.gu(30)
167+ primaryItem: Icon {
168+ width: height
169+ height: parent.height - units.gu(1)
170+ name: "search"
171+ }
172+
173 text: "The orange (specifically, the sweet orange) is the fruit of the citrus species Citrus × ​sinensis in the family Rutaceae."
174 }
175 Button {

Subscribers

People subscribed via source and target branches

to status/vote changes: