align right short local messages #LINQT-1975

This commit is contained in:
Gaelle Braud 2025-09-03 10:12:46 +02:00
parent f974a78fb9
commit f30d8f3d7f
7 changed files with 44 additions and 42 deletions

View file

@ -374,8 +374,8 @@ void AccountCore::setUnreadMessageNotifications(int unread) {
void AccountCore::onRegistrationStateChanged(const std::shared_ptr<linphone::Account> &account,
linphone::RegistrationState state,
const std::string &message) {
lDebug() << log().arg(Q_FUNC_INFO) << (int)state;
mRegistrationState = LinphoneEnums::fromLinphone(state);
lDebug() << log().arg(Q_FUNC_INFO) << mRegistrationState;
emit registrationStateChanged(Utils::coreStringToAppString(message));
}

View file

@ -262,6 +262,7 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
bool isConf = call && call->getConference() != nullptr;
auto subject = call->getConference() ? Utils::coreStringToAppString(call->getConference()->getSubject()) : "";
mCallModelConnection->invokeToCore([this, state, subject, isConf]() {
lDebug() << log().arg("::onStateChanged") << LinphoneEnums::fromLinphone(state);
setRecordable(state == linphone::Call::State::StreamsRunning);
setPaused(state == linphone::Call::State::Paused || state == linphone::Call::State::PausedByRemote);
if (mConference) mConference->setSubject(subject);

View file

@ -669,64 +669,64 @@
<translation>Die Aufnahme wurde in der folgenden Datei gespeichert: %1</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="393"/>
<location filename="../../core/call/CallCore.cpp" line="418"/>
<location filename="../../core/call/CallCore.cpp" line="394"/>
<location filename="../../core/call/CallCore.cpp" line="419"/>
<source>call_stats_codec_label</source>
<extracomment>&quot;Codec: %1 / %2 kHz&quot;</extracomment>
<translation>Codec: %1 / %2 kHz</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="397"/>
<location filename="../../core/call/CallCore.cpp" line="421"/>
<location filename="../../core/call/CallCore.cpp" line="398"/>
<location filename="../../core/call/CallCore.cpp" line="422"/>
<source>call_stats_bandwidth_label</source>
<extracomment>&quot;Bande passante : %1 %2 kbits/s %3 %4 kbits/s&quot;</extracomment>
<translation>Bandbreite: %1 %2 kbits/s %3 %4 kbits/s</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="403"/>
<location filename="../../core/call/CallCore.cpp" line="426"/>
<location filename="../../core/call/CallCore.cpp" line="404"/>
<location filename="../../core/call/CallCore.cpp" line="427"/>
<source>call_stats_loss_rate_label</source>
<extracomment>&quot;Taux de perte: %1% %2%&quot;</extracomment>
<translation>Verlustquote: %1% %2%</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="408"/>
<location filename="../../core/call/CallCore.cpp" line="409"/>
<source>call_stats_jitter_buffer_label</source>
<extracomment>&quot;Tampon de gigue: %1 ms&quot;</extracomment>
<translation>Jitter-Puffer: %1 ms</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="435"/>
<location filename="../../core/call/CallCore.cpp" line="436"/>
<source>call_stats_resolution_label</source>
<extracomment>&quot;Définition vidéo : %1 %2 %3 %4&quot;</extracomment>
<translation>Videoauflösung: %1 %2 %3 %4</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="441"/>
<location filename="../../core/call/CallCore.cpp" line="442"/>
<source>call_stats_fps_label</source>
<extracomment>&quot;FPS : %1 %2 %3 %4&quot;</extracomment>
<translation>FPS : %1 %2 %3 %4</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="654"/>
<location filename="../../core/call/CallCore.cpp" line="655"/>
<source>media_encryption_dtls</source>
<extracomment>DTLS</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="657"/>
<location filename="../../core/call/CallCore.cpp" line="658"/>
<source>media_encryption_none</source>
<extracomment>None</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="660"/>
<location filename="../../core/call/CallCore.cpp" line="661"/>
<source>media_encryption_srtp</source>
<extracomment>SRTP</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="663"/>
<location filename="../../core/call/CallCore.cpp" line="664"/>
<source>media_encryption_post_quantum</source>
<extracomment>&quot;ZRTP - Post quantique&quot;</extracomment>
<translation type="unfinished">Post-quantum ZRTP</translation>

View file

@ -669,64 +669,64 @@
<translation>Recording has been saved in file : %1</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="393"/>
<location filename="../../core/call/CallCore.cpp" line="418"/>
<location filename="../../core/call/CallCore.cpp" line="394"/>
<location filename="../../core/call/CallCore.cpp" line="419"/>
<source>call_stats_codec_label</source>
<extracomment>&quot;Codec: %1 / %2 kHz&quot;</extracomment>
<translation>Codec: %1 / %2 kHz</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="397"/>
<location filename="../../core/call/CallCore.cpp" line="421"/>
<location filename="../../core/call/CallCore.cpp" line="398"/>
<location filename="../../core/call/CallCore.cpp" line="422"/>
<source>call_stats_bandwidth_label</source>
<extracomment>&quot;Bande passante : %1 %2 kbits/s %3 %4 kbits/s&quot;</extracomment>
<translation>Bandwidth : %1 %2 kbits/s %3 %4 kbits/s</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="403"/>
<location filename="../../core/call/CallCore.cpp" line="426"/>
<location filename="../../core/call/CallCore.cpp" line="404"/>
<location filename="../../core/call/CallCore.cpp" line="427"/>
<source>call_stats_loss_rate_label</source>
<extracomment>&quot;Taux de perte: %1% %2%&quot;</extracomment>
<translation>Loss rate: %1% %2%</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="408"/>
<location filename="../../core/call/CallCore.cpp" line="409"/>
<source>call_stats_jitter_buffer_label</source>
<extracomment>&quot;Tampon de gigue: %1 ms&quot;</extracomment>
<translation>Jitter buffer : %1 ms</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="435"/>
<location filename="../../core/call/CallCore.cpp" line="436"/>
<source>call_stats_resolution_label</source>
<extracomment>&quot;Définition vidéo : %1 %2 %3 %4&quot;</extracomment>
<translation>Video resolution: %1 %2 %3 %4</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="441"/>
<location filename="../../core/call/CallCore.cpp" line="442"/>
<source>call_stats_fps_label</source>
<extracomment>&quot;FPS : %1 %2 %3 %4&quot;</extracomment>
<translation>FPS : %1 %2 %3 %4</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="654"/>
<location filename="../../core/call/CallCore.cpp" line="655"/>
<source>media_encryption_dtls</source>
<extracomment>DTLS</extracomment>
<translation>DTLS</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="657"/>
<location filename="../../core/call/CallCore.cpp" line="658"/>
<source>media_encryption_none</source>
<extracomment>None</extracomment>
<translation>None</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="660"/>
<location filename="../../core/call/CallCore.cpp" line="661"/>
<source>media_encryption_srtp</source>
<extracomment>SRTP</extracomment>
<translation>SRTP</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="663"/>
<location filename="../../core/call/CallCore.cpp" line="664"/>
<source>media_encryption_post_quantum</source>
<extracomment>&quot;ZRTP - Post quantique&quot;</extracomment>
<translation>Post quantum ZRTP</translation>

View file

@ -669,64 +669,64 @@
<translation>L&apos;appel a é enregistré dans le fichier : %1</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="393"/>
<location filename="../../core/call/CallCore.cpp" line="418"/>
<location filename="../../core/call/CallCore.cpp" line="394"/>
<location filename="../../core/call/CallCore.cpp" line="419"/>
<source>call_stats_codec_label</source>
<extracomment>&quot;Codec: %1 / %2 kHz&quot;</extracomment>
<translation>Codec: %1 / %2 kHz</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="397"/>
<location filename="../../core/call/CallCore.cpp" line="421"/>
<location filename="../../core/call/CallCore.cpp" line="398"/>
<location filename="../../core/call/CallCore.cpp" line="422"/>
<source>call_stats_bandwidth_label</source>
<extracomment>&quot;Bande passante : %1 %2 kbits/s %3 %4 kbits/s&quot;</extracomment>
<translation>Bande passante : %1 %2 kbits/s %3 %4 kbits/s</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="403"/>
<location filename="../../core/call/CallCore.cpp" line="426"/>
<location filename="../../core/call/CallCore.cpp" line="404"/>
<location filename="../../core/call/CallCore.cpp" line="427"/>
<source>call_stats_loss_rate_label</source>
<extracomment>&quot;Taux de perte: %1% %2%&quot;</extracomment>
<translation>Taux de perte: %1% %2%</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="408"/>
<location filename="../../core/call/CallCore.cpp" line="409"/>
<source>call_stats_jitter_buffer_label</source>
<extracomment>&quot;Tampon de gigue: %1 ms&quot;</extracomment>
<translation>Tampon de gigue: %1 ms</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="435"/>
<location filename="../../core/call/CallCore.cpp" line="436"/>
<source>call_stats_resolution_label</source>
<extracomment>&quot;Définition vidéo : %1 %2 %3 %4&quot;</extracomment>
<translation>Définition vidéo : %1 %2 %3 %4</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="441"/>
<location filename="../../core/call/CallCore.cpp" line="442"/>
<source>call_stats_fps_label</source>
<extracomment>&quot;FPS : %1 %2 %3 %4&quot;</extracomment>
<translation>FPS : %1 %2 %3 %4</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="654"/>
<location filename="../../core/call/CallCore.cpp" line="655"/>
<source>media_encryption_dtls</source>
<extracomment>DTLS</extracomment>
<translation>DTLS</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="657"/>
<location filename="../../core/call/CallCore.cpp" line="658"/>
<source>media_encryption_none</source>
<extracomment>None</extracomment>
<translation>None</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="660"/>
<location filename="../../core/call/CallCore.cpp" line="661"/>
<source>media_encryption_srtp</source>
<extracomment>SRTP</extracomment>
<translation>SRTP</translation>
</message>
<message>
<location filename="../../core/call/CallCore.cpp" line="663"/>
<location filename="../../core/call/CallCore.cpp" line="664"/>
<source>media_encryption_post_quantum</source>
<extracomment>&quot;ZRTP - Post quantique&quot;</extracomment>
<translation>ZRTP - Post quantique</translation>

View file

@ -407,7 +407,6 @@ void CallModel::onInfoMessageReceived(const std::shared_ptr<linphone::Call> &cal
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::StreamsRunning) {
setConference(call->getConference());
mDurationTimer.start();

View file

@ -11,6 +11,7 @@ import Linphone
ColumnLayout {
id: mainItem
property ChatMessageGui chatMessageGui: null
property bool isRemoteMessage: chatMessageGui? chatMessageGui.core.isRemoteMessage : false
property ChatGui chatGui: null
signal isFileHoveringChanged(bool isFileHovering)
@ -28,7 +29,7 @@ ColumnLayout {
spacing: Math.round(5 * DefaultStyle.dp)
property int padding: Math.round(10 * DefaultStyle.dp)
// VOICE MESSAGES
Repeater {
id: messagesVoicesList
@ -97,6 +98,7 @@ ColumnLayout {
}
delegate: ChatTextContent {
Layout.fillWidth: true
horizontalAlignment: mainItem.isRemoteMessage || implicitWidth > mainItem.width ? TextEdit.AlignLeft : TextEdit.AlignRight
// height: implicitHeight
contentGui: modelData
chatGui: mainItem.chatGui