on xenial help sign in
Don't expand indicators when tap to return to call. Fixes: #1453217
8e0aa6bhandsome_feng
qml/Panel/IndicatorsMenu.qml+2−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 showOnClick: true
39 property color panelColor: "black"
40 property color panelColor: "black"
40
41
41 signal showTapped(point position)
42 signal showTapped(point position)
@@ -168,7 +169,7 @@ Showable {
168 anchors.left: parent.left
169 anchors.left: parent.left
169 anchors.right: parent.right
170 anchors.right: parent.right
170 height: minimizedPanelHeight
171 height: minimizedPanelHeight
171− enabled: __showDragHandle.enabled
172+ enabled: __showDragHandle.enabled && showOnClick
172 onClicked: {
173 onClicked: {
173 bar.selectItemAt(mouseX)
174 bar.selectItemAt(mouseX)
174 root.show()
175 root.show()
qml/Panel/Panel.qml+1
@@ -147,6 +147,7 @@ Item {
147 return root.width
147 return root.width
148 }
148 }
149 enableHint: !callHint.active && !fullscreenMode
149 enableHint: !callHint.active && !fullscreenMode
150+ showOnClick: !callHint.visible
150 panelColor: indicatorAreaBackground.color
151 panelColor: indicatorAreaBackground.color
151
152
152 onShowTapped: {
153 onShowTapped: {
tests/qmltests/Panel/tst_Panel.qml+18
@@ -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"
@@ -421,6 +422,23 @@ IndicatorTest {
421 verify(panel.indicators.fullyClosed);
422 verify(panel.indicators.fullyClosed);
422 }
423 }
423
424
425+ function test_tapToReturnCallDoesntExpandIndicators() {
426+ compare(panel.indicators.shown, false);
427+ verify(panel.indicators.fullyClosed);
428+
429+ callManager.foregroundCall = phoneCall;
430+
431+ ApplicationManager.focusApplication("unity8-dash");
432+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
433+
434+ mouseClick(panel.indicators,
435+ panel.indicators.width / 2,
436+ panel.indicators.minimizedPanelHeight / 2);
437+
438+ compare(panel.indicators.shown, false);
439+ verify(panel.indicators.fullyClosed);
440+ }
441+
424 function test_openAndClosePanelWithMouseClicks() {
442 function test_openAndClosePanelWithMouseClicks() {
425 compare(panel.indicators.shown, false);
443 compare(panel.indicators.shown, false);
426 verify(panel.indicators.fullyClosed);
444 verify(panel.indicators.fullyClosed);