on xenial help sign in
Don't expand indicators when tap to return to call
48ce236handsome_feng
qml/Panel/IndicatorsMenu.qml+3−1
@@ -36,6 +36,7 @@ Showable {
36 readonly property bool fullyClosed: unitProgress == 0
36 readonly property bool fullyClosed: unitProgress == 0
37 property bool enableHint: true
37 property bool enableHint: true
38 property bool contentEnabled: true
38 property bool contentEnabled: true
39+ property bool callHintVisible: false
39 property color panelColor: "black"
40 property color panelColor: "black"
40
41
41 signal showTapped(point position)
42 signal showTapped(point position)
@@ -164,11 +165,12 @@ Showable {
164 }
165 }
165
166
166 MouseArea {
167 MouseArea {
168+ objectName: "showDragArea"
167 anchors.bottom: parent.bottom
169 anchors.bottom: parent.bottom
168 anchors.left: parent.left
170 anchors.left: parent.left
169 anchors.right: parent.right
171 anchors.right: parent.right
170 height: minimizedPanelHeight
172 height: minimizedPanelHeight
171− enabled: __showDragHandle.enabled
173+ enabled: __showDragHandle.enabled && !callHintVisible
172 onClicked: {
174 onClicked: {
173 bar.selectItemAt(mouseX)
175 bar.selectItemAt(mouseX)
174 root.show()
176 root.show()
qml/Panel/Panel.qml+1
@@ -138,6 +138,7 @@ Item {
138 return root.width
138 return root.width
139 }
139 }
140 enableHint: !callHint.active && !fullscreenMode
140 enableHint: !callHint.active && !fullscreenMode
141+ callHintVisible: callHint.visible
141 panelColor: indicatorAreaBackground.color
142 panelColor: indicatorAreaBackground.color
142
143
143 onShowTapped: {
144 onShowTapped: {
tests/qmltests/Panel/tst_Panel.qml+13
@@ -19,6 +19,7 @@ import QtQuick.Layouts 1.1
19import QtTest 1.0
19import QtTest 1.0
20import Unity.Test 0.1
20import Unity.Test 0.1
21import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
22+import Unity.Application 0.1
22import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
23import Ubuntu.Telephony 0.1 as Telephony
24import Ubuntu.Telephony 0.1 as Telephony
24import "../../../qml/Panel"
25import "../../../qml/Panel"
@@ -423,6 +424,18 @@ IndicatorTest {
423 verify(panel.indicators.fullyClosed);
424 verify(panel.indicators.fullyClosed);
424 }
425 }
425
426
427+ function test_tapToReturnCallDontExpendIndicators() {
428+ callManager.foregroundCall = phoneCall;
429+
430+ ApplicationManager.focusApplication("unity8-dash");
431+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
432+
433+ var showDragArea = findChild(panel.indicators, "showDragArea");
434+ verify(showDragArea !== null);
435+
436+ compare(showDragArea.enabled, false);
437+ }
438+
426 function test_openAndClosePanelWithMouseClicks() {
439 function test_openAndClosePanelWithMouseClicks() {
427 compare(panel.indicators.shown, false);
440 compare(panel.indicators.shown, false);
428 verify(panel.indicators.fullyClosed);
441 verify(panel.indicators.fullyClosed);