mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
UI fixes:
button color #LINQT-1894 fix display name call history
This commit is contained in:
parent
598b45bbf4
commit
e901f0046b
5 changed files with 18 additions and 16 deletions
|
|
@ -128,14 +128,16 @@ void CallHistoryCore::setSelf(QSharedPointer<CallHistoryCore> me) {
|
|||
mCoreModelConnection->makeConnectToModel(&CoreModel::friendRemoved, &CallHistoryCore::onRemoved);
|
||||
// Update display name when display name has been requested from magic search cause not found in linphone friends
|
||||
// (required to get the right display name if ldap friends cleared)
|
||||
mCoreModelConnection->makeConnectToModel(&CoreModel::magicSearchResultReceived,
|
||||
[this, remoteAddress = mRemoteAddress] {
|
||||
auto displayName = ToolModel::getDisplayName(remoteAddress);
|
||||
mCoreModelConnection->invokeToCore([this, displayName]() {
|
||||
mDisplayName = displayName;
|
||||
emit displayNameChanged();
|
||||
});
|
||||
});
|
||||
// This replace the display name set by a user by a default one, use the linphone address to
|
||||
// get a correct display name
|
||||
// mCoreModelConnection->makeConnectToModel(&CoreModel::magicSearchResultReceived,
|
||||
// [this, remoteAddress = mRemoteAddress] {
|
||||
// auto displayName = ToolModel::getDisplayName(remoteAddress);
|
||||
// mCoreModelConnection->invokeToCore([this, displayName]() {
|
||||
// mDisplayName = displayName;
|
||||
// emit displayNameChanged();
|
||||
// });
|
||||
// });
|
||||
}
|
||||
|
||||
ConferenceInfoGui *CallHistoryCore::getConferenceInfoGui() const {
|
||||
|
|
|
|||
|
|
@ -60,10 +60,10 @@ ChatCore::ChatCore(const std::shared_ptr<linphone::ChatRoom> &chatRoom) : QObjec
|
|||
if (chatRoom->hasCapability((int)linphone::ChatRoom::Capabilities::OneToOne)) {
|
||||
if (participants.size() > 0) {
|
||||
auto peer = participants.front();
|
||||
if (peer) mTitle = ToolModel::getDisplayName(peer->getAddress());
|
||||
mAvatarUri = ToolModel::getDisplayName(peer->getAddress());
|
||||
auto peerAddress = peer->getAddress();
|
||||
if (peer) mTitle = ToolModel::getDisplayName(peerAddress);
|
||||
mAvatarUri = ToolModel::getDisplayName(peerAddress);
|
||||
if (participants.size() == 1) {
|
||||
auto peerAddress = peer->getAddress();
|
||||
if (peerAddress) mParticipantAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,10 +130,9 @@ ListView {
|
|||
spacing: Math.round(10 * DefaultStyle.dp)
|
||||
Avatar {
|
||||
id: historyAvatar
|
||||
property var contactObj: UtilsCpp.findFriendByAddress(
|
||||
modelData.core.remoteAddress)
|
||||
property var contactObj: UtilsCpp.findFriendByAddress(modelData.core.remoteAddress)
|
||||
contact: contactObj?.value || null
|
||||
_address: modelData.core.remoteAddress
|
||||
displayNameVal: modelData.core.displayName
|
||||
secured: securityLevel === LinphoneEnums.SecurityLevel.EndToEndEncryptedAndVerified
|
||||
width: Math.round(45 * DefaultStyle.dp)
|
||||
height: Math.round(45 * DefaultStyle.dp)
|
||||
|
|
@ -149,7 +148,7 @@ ListView {
|
|||
id: friendAddress
|
||||
Layout.fillWidth: true
|
||||
maximumLineCount: 1
|
||||
text: historyAvatar.displayNameVal
|
||||
text: modelData.core.displayName
|
||||
font {
|
||||
pixelSize: Typography.p1.pixelSize
|
||||
weight: Typography.p1.weight
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ Notification {
|
|||
Layout.preferredHeight: Math.round(60 * DefaultStyle.dp)
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
call: mainItem.call
|
||||
displayNameVal: mainItem.displayName
|
||||
secured: securityLevel === LinphoneEnums.SecurityLevel.EndToEndEncryptedAndVerified
|
||||
isConference: mainItem.call && mainItem.call.core.isConference
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1265,7 +1265,7 @@ AbstractWindow {
|
|||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Math.round(71 * DefaultStyle.dp)
|
||||
color: parent.enabled ? parent.checked ? DefaultStyle.success_500main : parent.pressed ? DefaultStyle.main2_400 : DefaultStyle.grey_500 : DefaultStyle.grey_600
|
||||
color: parent.enabled ? parent.checked ? DefaultStyle.success_500main : parent.pressed || parent.hovered ? DefaultStyle.main2_400 : DefaultStyle.grey_500 : DefaultStyle.grey_600
|
||||
}
|
||||
enabled: mainWindow.conference
|
||||
|| mainWindow.callState != LinphoneEnums.CallState.PausedByRemote
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue