fix #LINQT-1320 ui call

This commit is contained in:
Gaelle Braud 2024-10-03 17:30:18 +02:00
parent 5b9f5cb056
commit 8a21a00c09
5 changed files with 644 additions and 634 deletions

View file

@ -421,7 +421,7 @@ void CallModel::onStateChanged(const std::shared_ptr<linphone::Call> &call,
linphone::Call::State state,
const std::string &message) {
lDebug() << "CallModel::onStateChanged" << (int)state;
if (state == linphone::Call::State::Connected) {
if (state == linphone::Call::State::StreamsRunning) {
mDurationTimer.start();
// After UpdatedByRemote, video direction could be changed.
auto videoDirection = call->getCurrentParams()->getVideoDirection();

View file

@ -90,7 +90,12 @@ QString ToolModel::getDisplayName(QString address) {
mustBeInLinphoneThread(QString(gClassName) + " : " + Q_FUNC_INFO);
QString displayName = getDisplayName(interpretUrl(address));
return displayName.isEmpty() ? address : displayName;
if (displayName.isEmpty()) return address;
QStringList nameSplitted = displayName.split(" ");
for (auto &part : nameSplitted) {
part[0] = part[0].toUpper();
}
return nameSplitted.join(" ");
}
bool ToolModel::createCall(const QString &sipAddress,

View file

@ -112,9 +112,9 @@ FocusScope {
}
}
ColumnLayout {
spacing: 18 * DefaultStyle.dp
visible: contactList.contentHeight > 0
Text {
text: qsTr("All contacts")
text: qsTr("Contacts")
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp

View file

@ -302,7 +302,7 @@ AbstractMainPage {
RowLayout {
spacing: 0
Text {
text: qsTr("All contacts")
text: qsTr("Contacts")
font {
pixelSize: 16 * DefaultStyle.dp
weight: 800 * DefaultStyle.dp

View file

@ -297,6 +297,7 @@ AbstractWindow {
Item {
id: headerItem
Layout.margins: 10 * DefaultStyle.dp
Layout.leftMargin: 20 * DefaultStyle.dp
Layout.fillWidth: true
Layout.minimumHeight: 25 * DefaultStyle.dp
RowLayout {
@ -335,17 +336,21 @@ AbstractWindow {
}
Text {
id: callStatusText
property var remoteNameObj: mainWindow.call ? UtilsCpp.getDisplayName(mainWindow.call.core.peerAddress) : null
property string remoteName: remoteNameObj
? remoteNameObj.value
: mainWindow.call
? EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
: ""
text: (mainWindow.callState === LinphoneEnums.CallState.End || mainWindow.callState === LinphoneEnums.CallState.Released)
? qsTr("End of the call")
? qsTr("Fin d'appel")
: mainWindow.call && (mainWindow.call.core.paused
|| (mainWindow.callState === LinphoneEnums.CallState.Paused
|| mainWindow.callState === LinphoneEnums.CallState.PausedByRemote))
? (mainWindow.conference ? qsTr('Réunion mise ') : qsTr('Appel mis')) + qsTr(" en pause")
: mainWindow.conference
? mainWindow.conference.core.subject
: mainWindow.call
? EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
: ""
: remoteName
color: DefaultStyle.grey_0
font {
pixelSize: 22 * DefaultStyle.dp
@ -531,7 +536,6 @@ AbstractWindow {
Layout.fillWidth: true
Layout.fillHeight: true
spacing: 23 * DefaultStyle.dp
Layout.rightMargin: 20 * DefaultStyle.dp
Control.StackView {
id: middleItemStackView
initialItem: inCallItem
@ -541,6 +545,7 @@ AbstractWindow {
CallSettingsPanel {
id: rightPanel
Layout.fillHeight: true
Layout.rightMargin: 20 * DefaultStyle.dp
Layout.preferredWidth: 393 * DefaultStyle.dp
Layout.topMargin: 10 * DefaultStyle.dp
property int currentIndex: 0
@ -553,6 +558,7 @@ AbstractWindow {
contentStackView.initialItem: callsListPanel
headerValidateButtonText: qsTr("Ajouter")
}
}
Component {
id: contactsListPanel
Item {
@ -1269,7 +1275,6 @@ AbstractWindow {
Item{Layout.fillHeight: true}
}
}
}
Component {
id: waitingRoom
WaitingRoom {