on xenial help sign in
Don't expand indicators when tap to return to call. Fixes: #1453217

Approved by: Nick Dedekind

commit8e0aa6bd79e4c0c73dd221ae5a61bc84e89f4456 authorhandsome_feng <445865575@qq.com> dateWed 29 Jul 2015, 12:37 (11 years ago) parentd6460955c13656
3 files changed+21−1
qml/Panel/IndicatorsMenu.qml+2−1 qml/Panel/Panel.qml+1 tests/qmltests/Panel/tst_Panel.qml+18
qml/Panel/IndicatorsMenu.qml+2−1
@@ -36,6 +36,7 @@ Showable {
3636 readonly property bool fullyClosed: unitProgress == 0
3737 property bool enableHint: true
3838 property bool contentEnabled: true
39+ property bool showOnClick: true
3940 property color panelColor: "black"
4041
4142 signal showTapped(point position)
@@ -168,7 +169,7 @@ Showable {
168169 anchors.left: parent.left
169170 anchors.right: parent.right
170171 height: minimizedPanelHeight
171− enabled: __showDragHandle.enabled
172+ enabled: __showDragHandle.enabled && showOnClick
172173 onClicked: {
173174 bar.selectItemAt(mouseX)
174175 root.show()
qml/Panel/Panel.qml+1
@@ -147,6 +147,7 @@ Item {
147147 return root.width
148148 }
149149 enableHint: !callHint.active && !fullscreenMode
150+ showOnClick: !callHint.visible
150151 panelColor: indicatorAreaBackground.color
151152
152153 onShowTapped: {
tests/qmltests/Panel/tst_Panel.qml+18
@@ -19,6 +19,7 @@ import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import Unity.Test 0.1
2121import Ubuntu.Components 0.1
22+import Unity.Application 0.1
2223import Unity.Indicators 0.1 as Indicators
2324import Ubuntu.Telephony 0.1 as Telephony
2425import "../../../qml/Panel"
@@ -421,6 +422,23 @@ IndicatorTest {
421422 verify(panel.indicators.fullyClosed);
422423 }
423424
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+
424442 function test_openAndClosePanelWithMouseClicks() {
425443 compare(panel.indicators.shown, false);
426444 verify(panel.indicators.fullyClosed);