Merge lp:~uriboni/webbrowser-app/tabs-use-haptics into lp:webbrowser-app

Proposed by Ugo Riboni on 2015-10-26
Status: Merged
Approved by: Olivier Tilloy on 2015-10-27
Approved revision: 1257
Merged at revision: 1263
Proposed branch: lp:~uriboni/webbrowser-app/tabs-use-haptics
Merge into: lp:webbrowser-app
Diff against target: 30 lines (+7/-3)
1 file modified
src/app/webbrowser/TabItem.qml (+7/-3)
To merge this branch: bzr merge lp:~uriboni/webbrowser-app/tabs-use-haptics
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-10-27
Olivier Tilloy 2015-10-26 Approve on 2015-10-27
Review via email: mp+275726@code.launchpad.net

Commit Message

Use AbstractButton to handle some tab interactions so that haptics are used on touch.

Description of the Change

Use AbstractButton to handle some tab interactions on mobile so that haptics are triggered

To post a comment you must log in.
1257. By Ugo Riboni on 2015-10-26

Handle close tab interactions via AbstractButtons instead of MouseArea so they trigger haptics on mobile

Olivier Tilloy (osomon) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/webbrowser/TabItem.qml'
2--- src/app/webbrowser/TabItem.qml 2015-09-29 09:31:50 +0000
3+++ src/app/webbrowser/TabItem.qml 2015-10-26 15:34:34 +0000
4@@ -114,12 +114,10 @@
5 }
6 }
7
8- MouseArea {
9+ AbstractButton {
10 id: closeButton
11 objectName: "closeButton"
12
13- acceptedButtons: Qt.LeftButton | Qt.MiddleButton
14-
15 // On mobile the tap area to close the tab occupies the whole right
16 // hand side of the tab, while it covers only the close icon in
17 // other form factors
18@@ -131,6 +129,12 @@
19 width: mobile ? units.gu(4) : closeIcon.width
20
21 onClicked: closed()
22+
23+ MouseArea {
24+ anchors.fill: parent
25+ acceptedButtons: Qt.MiddleButton
26+ onClicked: closed()
27+ }
28 }
29
30 Icon {

Subscribers

People subscribed via source and target branches

to status/vote changes: