on xenial help sign in
Don't expand indicators when tap to return to call
commit48ce236befcf6d1a9817422103aa4670066752ce authorhandsome_feng <445865575@qq.com> dateTue 9 Jun 2015, 10:38 (11 years ago) parentd667b2d
3 files changed+17−1
qml/Panel/IndicatorsMenu.qml+3−1 qml/Panel/Panel.qml+1 tests/qmltests/Panel/tst_Panel.qml+13
qml/Panel/IndicatorsMenu.qml+3−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 callHintVisible: false
3940 property color panelColor: "black"
4041
4142 signal showTapped(point position)
@@ -164,11 +165,12 @@ Showable {
164165 }
165166
166167 MouseArea {
168+ objectName: "showDragArea"
167169 anchors.bottom: parent.bottom
168170 anchors.left: parent.left
169171 anchors.right: parent.right
170172 height: minimizedPanelHeight
171− enabled: __showDragHandle.enabled
173+ enabled: __showDragHandle.enabled && !callHintVisible
172174 onClicked: {
173175 bar.selectItemAt(mouseX)
174176 root.show()
qml/Panel/Panel.qml+1
@@ -138,6 +138,7 @@ Item {
138138 return root.width
139139 }
140140 enableHint: !callHint.active && !fullscreenMode
141+ callHintVisible: callHint.visible
141142 panelColor: indicatorAreaBackground.color
142143
143144 onShowTapped: {
tests/qmltests/Panel/tst_Panel.qml+13
@@ -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"
@@ -423,6 +424,18 @@ IndicatorTest {
423424 verify(panel.indicators.fullyClosed);
424425 }
425426
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+
426439 function test_openAndClosePanelWithMouseClicks() {
427440 compare(panel.indicators.shown, false);
428441 verify(panel.indicators.fullyClosed);