From d91986a184936d28b4e9d6e131e42c9b59b901db Mon Sep 17 00:00:00 2001 From: Thilo Molitor Date: Mon, 2 Oct 2023 21:57:24 +0200 Subject: [PATCH] Improve call ui --- Monal/Classes/AVCallUI.swift | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Monal/Classes/AVCallUI.swift b/Monal/Classes/AVCallUI.swift index fc3b459683..a9a6d86d7e 100644 --- a/Monal/Classes/AVCallUI.swift +++ b/Monal/Classes/AVCallUI.swift @@ -87,6 +87,24 @@ struct AVCallUI: View { Spacer().frame(height: 24) HStack(alignment: .top) { + VStack { + Spacer().frame(height: 8) + switch MLCallDirection(rawValue:call.direction) { + case .incoming: + Image(systemName: "phone.arrow.down.left") + .resizable() + .frame(width: 20.0, height: 20.0) + .foregroundColor(.primary) + case .outgoing: + Image(systemName: "phone.arrow.up.right") + .resizable() + .frame(width: 20.0, height: 20.0) + .foregroundColor(.primary) + default: //should never be reached + Text("") + } + } + VStack { Spacer().frame(height: 8) Button(action: { @@ -97,54 +115,36 @@ struct AVCallUI: View { case .unknown: Text("") case .clear: + Spacer().frame(width: 10) Image(systemName: "xmark.shield.fill") .resizable() .frame(width: 20.0, height: 20.0) .foregroundColor(.red) - Spacer().frame(width: 10) case .toFU: + Spacer().frame(width: 10) Image(systemName: "checkmark.shield.fill") .resizable() .frame(width: 20.0, height: 20.0) .foregroundColor(.yellow) - Spacer().frame(width: 10) case .trusted: + Spacer().frame(width: 10) Image(systemName: "checkmark.shield.fill") .resizable() .frame(width: 20.0, height: 20.0) .foregroundColor(.green) - Spacer().frame(width: 10) default: //should never be reached Text("") } }) } - VStack { - Spacer().frame(height: 8) - switch MLCallDirection(rawValue:call.direction) { - case .incoming: - Image(systemName: "phone.arrow.down.left") - .resizable() - .frame(width: 20.0, height: 20.0) - .foregroundColor(.primary) - case .outgoing: - Image(systemName: "phone.arrow.up.right") - .resizable() - .frame(width: 20.0, height: 20.0) - .foregroundColor(.primary) - default: //should never be reached - Text("") - } - } - - Spacer().frame(width: 20) + Spacer().frame(minWidth:20) Text(contact.contactDisplayName as String) .font(.largeTitle) .foregroundColor(.primary) - Spacer().frame(width: 20) + Spacer().frame(minWidth:20) VStack { Spacer().frame(height: 8)