From e528b41780495d94f1a385816b9a865000b6056a Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Mon, 29 Jun 2015 18:17:58 +0200 Subject: [PATCH] [dialer] Simplify the showing logic of the main ConditionalLoader --- dialer/package/contents/ui/main.qml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dialer/package/contents/ui/main.qml b/dialer/package/contents/ui/main.qml index 13ca450a..9f889c8a 100644 --- a/dialer/package/contents/ui/main.qml +++ b/dialer/package/contents/ui/main.qml @@ -153,10 +153,13 @@ ApplicationWindow { //BEGIN UI PlasmaExtras.ConditionalLoader { anchors.fill: parent - when: root.visible && dialerUtils.callState == "idle" + + property bool shouldShow: root.visible && (dialerUtils.callState == "idle" || dialerUtils.callState == "failed") + + when: shouldShow source: Qt.resolvedUrl("Dialer/DialPage.qml") - z: dialerUtils.callState == "idle" ? 2 : 0 - opacity: dialerUtils.callState == "idle" ? 1 : 0 + z: shouldShow ? 2 : 0 + opacity: shouldShow ? 1 : 0 Behavior on opacity { OpacityAnimator { duration: units.shortDuration @@ -167,10 +170,13 @@ ApplicationWindow { PlasmaExtras.ConditionalLoader { anchors.fill: parent - when: dialerUtils.callState != "idle" + + property bool shouldShow: dialerUtils.callState != "idle" && dialerUtils.callState != "failed" + + when: shouldShow source: Qt.resolvedUrl("Call/CallPage.qml") - opacity: dialerUtils.callState != "idle" ? 1 : 0 - z: dialerUtils.callState != "idle" ? 2 : 0 + opacity: shouldShow ? 1 : 0 + z: shouldShow ? 2 : 0 Behavior on opacity { OpacityAnimator { duration: units.shortDuration