on xenial help sign in
touches
c423228Nick Dedekind
plugins/Ubuntu/Gestures/DirectionalDragArea.cpp+1
@@ -378,6 +378,7 @@ void DirectionalDragArea::touchEvent_undecided(QTouchEvent *event)
378 // touch has ended before recognition concluded
378 // touch has ended before recognition concluded
379 DDA_DEBUG("Touch has ended before recognition concluded");
379 DDA_DEBUG("Touch has ended before recognition concluded");
380 setStatus(WaitingForTouch);
380 setStatus(WaitingForTouch);
381+ Q_EMIT tapped();
381 return;
382 return;
382 }
383 }
383
384
plugins/Ubuntu/Gestures/DirectionalDragArea.h+1
@@ -212,6 +212,7 @@ Q_SIGNALS:
212 void touchYChanged(qreal value);
212 void touchYChanged(qreal value);
213 void touchSceneXChanged(qreal value);
213 void touchSceneXChanged(qreal value);
214 void touchSceneYChanged(qreal value);
214 void touchSceneYChanged(qreal value);
215+ void tapped();
215
216
216protected:
217protected:
217 virtual void touchEvent(QTouchEvent *event);
218 virtual void touchEvent(QTouchEvent *event);
qml/Panel/ActiveCallHint.qml+17−5
@@ -23,16 +23,29 @@ import "../Components"
23Item {
23Item {
24 id: callHint
24 id: callHint
25
25
26− readonly property bool active: callManager.hasCalls && ApplicationManager.focusedApplicationId !== "dialer-app"
26+ property bool active: true//callManager.hasCalls && ApplicationManager.focusedApplicationId !== "dialer-app"
27 readonly property QtObject contactWatcher: _contactWatcher
27 readonly property QtObject contactWatcher: _contactWatcher
28 property int alternateLabelInterval: 4000
28 property int alternateLabelInterval: 4000
29 property color color: Qt.rgba(0.1, 0.6, 0.1, 1.0)
29 property color color: Qt.rgba(0.1, 0.6, 0.1, 1.0)
30− property color colorFlash: Qt.rgba(0.1, 0.9, 0.1, 1.0)
30+ property color colorFlash: Qt.lighter(color)
31+ readonly property alias mouseArea: __mouseArea
31
32
32 Component.onCompleted: {
33 Component.onCompleted: {
33 telepathyHelper.registerChannelObserver("unity8");
34 telepathyHelper.registerChannelObserver("unity8");
34 }
35 }
35
36
37+ function activate() {
38+ console.log("PLOP")
39+// ApplicationManager.requestFocusApplication("dialer-app");
40+ }
41+
42+ Timer {
43+ running: true
44+ interval: 4000
45+ repeat: true
46+ onTriggered: active = !active
47+ }
48+
36 Rectangle {
49 Rectangle {
37 id: background
50 id: background
38 anchors.fill: parent
51 anchors.fill: parent
@@ -226,11 +239,10 @@ Item {
226 }
239 }
227 }
240 }
228
241
242+ // eater
229 MouseArea {
243 MouseArea {
244+ id: __mouseArea
230 anchors.fill: parent
245 anchors.fill: parent
231− onClicked: {
232− ApplicationManager.requestFocusApplication("dialer-app");
233− }
234 }
246 }
235
247
236 Telephony.ContactWatcher {
248 Telephony.ContactWatcher {
qml/Panel/Indicators.qml+8−2
@@ -43,6 +43,10 @@ Showable {
43 property bool initalizeItem: true
43 property bool initalizeItem: true
44 readonly property alias content: menuContent
44 readonly property alias content: menuContent
45 property real unitProgress: (height - panelHeight) / (openedHeight - panelHeight)
45 property real unitProgress: (height - panelHeight) / (openedHeight - panelHeight)
46+ property bool enableHint: true
47+ property real hintAreaHeightOffset: 0
48+
49+ signal showTapped(point position)
46
50
47 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
51 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
48 // use its own values. Need to ask design about this.
52 // use its own values. Need to ask design about this.
@@ -357,10 +361,10 @@ Showable {
357 anchors.bottomMargin: pinnedMode ? 0 : -panelHeight
361 anchors.bottomMargin: pinnedMode ? 0 : -panelHeight
358 anchors.left: parent.left
362 anchors.left: parent.left
359 anchors.right: parent.right
363 anchors.right: parent.right
360− height: panelHeight
364+ height: panelHeight + hintAreaHeightOffset
361 direction: Direction.Downwards
365 direction: Direction.Downwards
362 enabled: !indicators.shown && indicators.available
366 enabled: !indicators.shown && indicators.available
363− hintDisplacement: pinnedMode ? indicators.hintValue : 0
367+ hintDisplacement: enableHint && pinnedMode ? indicators.hintValue : 0
364 autoCompleteDragThreshold: maxTotalDragDistance / 2
368 autoCompleteDragThreshold: maxTotalDragDistance / 2
365 stretch: true
369 stretch: true
366 maxTotalDragDistance: openedHeight - panelHeight
370 maxTotalDragDistance: openedHeight - panelHeight
@@ -371,6 +375,8 @@ Showable {
371 menuContent.activateContent();
375 menuContent.activateContent();
372 }
376 }
373 }
377 }
378+
379+ onTapped: showTapped(Qt.point(x + touchX, y + touchY))
374 }
380 }
375 DragHandle {
381 DragHandle {
376 id: hideDragHandle
382 id: hideDragHandle
qml/Panel/Panel.qml+64−7
@@ -16,11 +16,12 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19+import Unity.Application 0.1
19import "../Components"
20import "../Components"
20
21
21Item {
22Item {
22 id: root
23 id: root
23− readonly property real panelHeight: callHint.active ? callHint.height + indicatorArea.indicatorHeight : indicatorArea.indicatorHeight
24+ readonly property real panelHeight: indicatorArea.y + indicatorArea.indicatorHeight
24 property alias indicators: indicatorsMenu
25 property alias indicators: indicatorsMenu
25 property bool fullscreenMode: false
26 property bool fullscreenMode: false
26 property bool searchVisible: true
27 property bool searchVisible: true
@@ -62,16 +63,30 @@ Item {
62 right: parent.right
63 right: parent.right
63 }
64 }
64 height: units.gu(3)
65 height: units.gu(3)
66+ y: -height
65
67
68+ states: [
69+ State {
66− y: active ? 0 : -height
70+ name: "active"
67− z: 1
71+ when: callHint.active
72+ PropertyChanges { target: callHint; y: 0 }
73+ PropertyChanges { target: search.mouseArea; anchors.topMargin: -callHint.height/3 }
74+ }
75+ ]
76+ Behavior on y { StandardAnimation { id: callHintYAnimation } }
68
77
69− Behavior on y { StandardAnimation {} }
78+ mouseArea.onClicked: callHint.activate();
79+
80+ Rectangle {
81+ anchors.fill: callHint.mouseArea
82+ color: Qt.rgba(0,1,0,0.5)
83+ }
70 }
84 }
71
85
72 Item {
86 Item {
73 id: indicatorArea
87 id: indicatorArea
74 objectName: "indicatorArea"
88 objectName: "indicatorArea"
89+ z: 1
75
90
76 readonly property real indicatorHeight: indicatorsMenu.panelHeight + leftSeparatorLine.height
91 readonly property real indicatorHeight: indicatorsMenu.panelHeight + leftSeparatorLine.height
77
92
@@ -80,7 +95,11 @@ Item {
80 right: parent.right
95 right: parent.right
81 }
96 }
82 height: root.height - indicatorArea.y
97 height: root.height - indicatorArea.y
83− z: 0
98+
99+ Behavior on y {
100+ enabled: !callHintYAnimation.running
101+ StandardAnimation {}
102+ }
84
103
85 PanelBackground {
104 PanelBackground {
86 id: panelBackground
105 id: panelBackground
@@ -113,6 +132,7 @@ Item {
113 }
132 }
114 color: "black"
133 color: "black"
115 opacity: indicatorsMenu.unitProgress * darkenedOpacity
134 opacity: indicatorsMenu.unitProgress * darkenedOpacity
135+
116 MouseArea {
136 MouseArea {
117 anchors.fill: parent
137 anchors.fill: parent
118 enabled: indicatorsMenu.shown
138 enabled: indicatorsMenu.shown
@@ -120,6 +140,23 @@ Item {
120 }
140 }
121 }
141 }
122
142
143+ MouseArea {
144+ id: indicatorAreaClick
145+ enabled: callHint.active
146+ anchors {
147+ top: parent.top
148+ left: search.right
149+ right: indicatorsMenu.right
150+ }
151+ height: indicatorsMenu.panelHeight/2
152+ onClicked: callHint.activate();
153+
154+ Rectangle {
155+ anchors.fill: indicatorAreaClick
156+ color: Qt.rgba(0,1,0,0.5)
157+ }
158+ }
159+
123 Indicators {
160 Indicators {
124 id: indicatorsMenu
161 id: indicatorsMenu
125 objectName: "indicators"
162 objectName: "indicators"
@@ -134,7 +171,20 @@ Item {
134 panelHeight: units.gu(3)
171 panelHeight: units.gu(3)
135 openedHeight: parent.height
172 openedHeight: parent.height
136 pinnedMode: !fullscreenMode
173 pinnedMode: !fullscreenMode
174+ enableHint: !callHint.active
137 overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width
175 overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width
176+ hintAreaHeightOffset: callHint.active ? callHint.height : 0
177+
178+ onShowTapped: {
179+ if (callHint.active && position.y < y + indicatorsMenu.panelHeight/2) {
180+ callHint.activate();
181+ }
182+ }
183+
184+ Rectangle {
185+ anchors.fill: indicatorsMenu
186+ color: Qt.rgba(1,1,0,0.5)
187+ }
138 }
188 }
139
189
140 PanelSeparatorLine {
190 PanelSeparatorLine {
@@ -174,7 +224,6 @@ Item {
174 if (root.searchVisible && !indicatorsMenu.showAll) {
224 if (root.searchVisible && !indicatorsMenu.showAll) {
175 return "visible";
225 return "visible";
176 }
226 }
177−
178 return "hidden";
227 return "hidden";
179 }
228 }
180
229
@@ -184,7 +233,13 @@ Item {
184 }
233 }
185 height: panelBackground.height
234 height: panelBackground.height
186
235
236+ mouseArea {
187− onClicked: root.searchClicked()
237+ onClicked: root.searchClicked()
238+ }
239+ Rectangle {
240+ anchors.fill: search.mouseArea
241+ color: Qt.rgba(1,0,0,0.5)
242+ }
188 }
243 }
189 }
244 }
190
245
@@ -193,11 +248,13 @@ Item {
193 name: "in" //fully opaque and visible at top edge of screen
248 name: "in" //fully opaque and visible at top edge of screen
194 when: !fullscreenMode
249 when: !fullscreenMode
195 PropertyChanges { target: indicatorArea; y: callHint.y + callHint.height }
250 PropertyChanges { target: indicatorArea; y: callHint.y + callHint.height }
251+ PropertyChanges { target: callHint; z: 0 }
196 },
252 },
197 State {
253 State {
198 name: "out" //pushed off screen
254 name: "out" //pushed off screen
199 when: fullscreenMode
255 when: fullscreenMode
200 PropertyChanges { target: indicatorArea; y: callHint.y + callHint.height - indicatorHeight }
256 PropertyChanges { target: indicatorArea; y: callHint.y + callHint.height - indicatorHeight }
257+ PropertyChanges { target: callHint; z: 2 }
201 }
258 }
202 ]
259 ]
203}
260}
qml/Panel/SearchIndicator.qml+2−3
@@ -25,13 +25,12 @@ Item {
25 height: units.gu(3)
25 height: units.gu(3)
26
26
27 property string headerText: i18n.tr("Search")
27 property string headerText: i18n.tr("Search")
28−
28+ readonly property alias mouseArea: __mouseArea
29− signal clicked
30
29
31 // eater
30 // eater
32 MouseArea {
31 MouseArea {
32+ id: __mouseArea
33 anchors.fill: parent
33 anchors.fill: parent
34− onClicked: search.clicked()
35 }
34 }
36
35
37 Row {
36 Row {
qml/Shell.qml+19−19
@@ -151,10 +151,10 @@ FocusScope {
151 shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
151 shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
152 enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
152 enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
153
153
154− y: panel.panelHeight
154+ anchors {
155− width: parent.width
155+ fill: parent
156− height: parent.height - panel.panelHeight
156+ topMargin: panel.panelHeight
157− Behavior on y { StandardAnimation {} }
157+ }
158
158
159 contentScale: 1.0 - 0.2 * disappearingAnimationProgress
159 contentScale: 1.0 - 0.2 * disappearingAnimationProgress
160 opacity: 1.0 - disappearingAnimationProgress
160 opacity: 1.0 - disappearingAnimationProgress
@@ -314,12 +314,12 @@ FocusScope {
314 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
314 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
315 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
315 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
316
316
317− y: panel.panelHeight
317+ anchors {
318− x: required ? 0 : - width
318+ top: parent.top
319− width: parent.width
319+ right: parent.right
320+ bottom: parent.bottom
320− height: parent.height - panel.panelHeight
321+ topMargin: panel.panelHeight
321− Behavior on y { StandardAnimation {} }
322+ }
322−
323 background: shell.background
323 background: shell.background
324 pinLength: 4
324 pinLength: 4
325
325
@@ -374,8 +374,6 @@ FocusScope {
374 y: panel.panelHeight
374 y: panel.panelHeight
375 width: parent.width
375 width: parent.width
376 height: parent.height - panel.panelHeight
376 height: parent.height - panel.panelHeight
377− Behavior on y { StandardAnimation {} }
378− Behavior on height { StandardAnimation {} }
379
377
380 Behavior on x {SmoothedAnimation{velocity: 600}}
378 Behavior on x {SmoothedAnimation{velocity: 600}}
381
379
@@ -463,6 +461,13 @@ FocusScope {
463 panel.hideIndicatorMenu(delay);
461 panel.hideIndicatorMenu(delay);
464 }
462 }
465
463
464+ Timer {
465+ running: true
466+ interval: 7000
467+ repeat: true
468+ onTriggered: {panel.fullscreenMode = !panel.fullscreenMode }
469+ }
470+
466 Item {
471 Item {
467 id: overlay
472 id: overlay
468
473
@@ -597,8 +602,6 @@ FocusScope {
597 y: panel.panelHeight
602 y: panel.panelHeight
598 width: parent.width
603 width: parent.width
599 height: parent.height - panel.panelHeight
604 height: parent.height - panel.panelHeight
600− Behavior on y { StandardAnimation {} }
601− Behavior on height { StandardAnimation {} }
602
605
603 states: [
606 states: [
604 State {
607 State {
@@ -652,11 +655,8 @@ FocusScope {
652 }
655 }
653
656
654 OSKController {
657 OSKController {
655− y: panel.panelHeight
658+ anchors.topMargin: panel.panelHeight
656− width: parent.width
659+ anchors.fill: parent // as needs to know the geometry of the shell
657− height: parent.height - panel.panelHeight
658− Behavior on y { StandardAnimation {} }
659− Behavior on height { StandardAnimation {} }
660 }
660 }
661
661
662 //FIXME: This should be handled in the input stack, keyboard shouldnt propagate
662 //FIXME: This should be handled in the input stack, keyboard shouldnt propagate