mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
[dialer] Simplify the showing logic of the main ConditionalLoader
This commit is contained in:
parent
b3af84b4a6
commit
e528b41780
1 changed files with 12 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue