diff --git a/Linphone/data/image/regitration_deactivated.svg b/Linphone/data/image/registration_deactivated.svg similarity index 100% rename from Linphone/data/image/regitration_deactivated.svg rename to Linphone/data/image/registration_deactivated.svg diff --git a/Linphone/data/image/regitration_error.svg b/Linphone/data/image/registration_error.svg similarity index 100% rename from Linphone/data/image/regitration_error.svg rename to Linphone/data/image/registration_error.svg diff --git a/Linphone/data/image/regitration_progress.svg b/Linphone/data/image/registration_progress.svg similarity index 100% rename from Linphone/data/image/regitration_progress.svg rename to Linphone/data/image/registration_progress.svg diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index 290ca6e94..79e192b7a 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -1764,19 +1764,19 @@ QUrl Utils::getRegistrationStateIcon(LinphoneEnums::RegistrationState state) { QUrl registrationStateIcon; switch (state) { case LinphoneEnums::RegistrationState::Refreshing: - registrationStateIcon = Utils::getAppIcon("regitrationProgress"); + registrationStateIcon = Utils::getAppIcon("registrationProgress"); break; case LinphoneEnums::RegistrationState::Progress: - registrationStateIcon = Utils::getAppIcon("regitrationProgress"); + registrationStateIcon = Utils::getAppIcon("registrationProgress"); break; case LinphoneEnums::RegistrationState::Failed: - registrationStateIcon = Utils::getAppIcon("regitrationError"); + registrationStateIcon = Utils::getAppIcon("registrationError"); break; case LinphoneEnums::RegistrationState::Cleared: - registrationStateIcon = Utils::getAppIcon("regitrationDeactivated"); + registrationStateIcon = Utils::getAppIcon("registrationDeactivated"); break; case LinphoneEnums::RegistrationState::None: - registrationStateIcon = Utils::getAppIcon("regitrationDeactivated"); + registrationStateIcon = Utils::getAppIcon("registrationDeactivated"); break; default: registrationStateIcon = QUrl(); diff --git a/Linphone/view/Control/Display/Contact/Avatar.qml b/Linphone/view/Control/Display/Contact/Avatar.qml index ba6a9259b..e390b1b26 100644 --- a/Linphone/view/Control/Display/Contact/Avatar.qml +++ b/Linphone/view/Control/Display/Contact/Avatar.qml @@ -116,10 +116,10 @@ Loader{ z: 1 source: account ? (account.core?.registrationState !== LinphoneEnums.RegistrationState.Ok - ? account.core?.registrationStateIcon + ? account.core?.registrationIcon : account.core?.presenceIcon) : (contact - ? contact.core?.presenceIcon + ? contact.core?.presenceIcon : "") } diff --git a/Linphone/view/Control/Display/Contact/Contact.qml b/Linphone/view/Control/Display/Contact/Contact.qml index cb0622017..b820d42cb 100644 --- a/Linphone/view/Control/Display/Contact/Contact.qml +++ b/Linphone/view/Control/Display/Contact/Contact.qml @@ -63,52 +63,53 @@ Control.Control{ Layout.maximumWidth: Math.round(150 * DefaultStyle.dp) Layout.preferredHeight: Math.round(24 * DefaultStyle.dp) Layout.preferredWidth: presenceOrRegistrationText.implicitWidth + Math.round(50 * DefaultStyle.dp) - contentItem: - Rectangle{ - id: presenceBar - property bool isRegistered: mainItem.account?.core.registrationState == LinphoneEnums.RegistrationState.Ok - color: DefaultStyle.main2_200 - radius: Math.round(15 * DefaultStyle.dp) - RowLayout { - anchors.fill: parent - Image { - sourceSize.width: 11 * DefaultStyle.dp - sourceSize.height: 11 * DefaultStyle.dp - smooth: false - Layout.preferredWidth: 11 * DefaultStyle.dp - Layout.preferredHeight: 11 * DefaultStyle.dp - source: presenceBar.isRegistered - ? mainItem.account.core.presenceIcon - : mainItem.account?.core.registrationStateIcon || "" - Layout.leftMargin: 8 * DefaultStyle.dp - } - Text { - id: presenceOrRegistrationText - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - visible: mainItem.account - // Test texts - // Timer{ - // running: true - // interval: 1000 - // repeat: true - // onTriggered: text.mode = (++text.mode) % 4 - // } - font.weight: Math.round(300 * DefaultStyle.dp) - font.pixelSize: Math.round(12 * DefaultStyle.dp) - color: presenceBar.isRegistered ? mainItem.account.core.presenceColor : mainItem.account?.core.registrationColor - text: presenceBar.isRegistered ? mainItem.account.core.presenceStatus : mainItem.account?.core.humaneReadableRegistrationState - } - EffectImage { - fillMode: Image.PreserveAspectFit - imageSource: AppIcons.downArrow - colorizationColor: DefaultStyle.main2_600 - Layout.preferredHeight: Math.round(14 * DefaultStyle.dp) - Layout.preferredWidth: Math.round(14 * DefaultStyle.dp) - Layout.rightMargin: 8 * DefaultStyle.dp - } + enabled: mainItem.account && mainItem.account.core.registrationState === LinphoneEnums.RegistrationState.Ok + onEnabledChanged: if(!enabled) close() + contentItem: Rectangle { + id: presenceBar + property bool isRegistered: mainItem.account?.core.registrationState === LinphoneEnums.RegistrationState.Ok + color: DefaultStyle.main2_200 + radius: Math.round(15 * DefaultStyle.dp) + RowLayout { + anchors.fill: parent + Image { + sourceSize.width: 11 * DefaultStyle.dp + sourceSize.height: 11 * DefaultStyle.dp + smooth: false + Layout.preferredWidth: 11 * DefaultStyle.dp + Layout.preferredHeight: 11 * DefaultStyle.dp + source: presenceBar.isRegistered + ? mainItem.account.core.presenceIcon + : mainItem.account?.core.registrationIcon || "" + Layout.leftMargin: 8 * DefaultStyle.dp + } + Text { + id: presenceOrRegistrationText + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + visible: mainItem.account + // Test texts + // Timer{ + // running: true + // interval: 1000 + // repeat: true + // onTriggered: text.mode = (++text.mode) % 4 + // } + font.weight: Math.round(300 * DefaultStyle.dp) + font.pixelSize: Math.round(12 * DefaultStyle.dp) + color: presenceBar.isRegistered ? mainItem.account.core.presenceColor : mainItem.account?.core.registrationColor + text: presenceBar.isRegistered ? mainItem.account.core.presenceStatus : mainItem.account?.core.humaneReadableRegistrationState + } + EffectImage { + fillMode: Image.PreserveAspectFit + imageSource: AppIcons.downArrow + colorizationColor: DefaultStyle.main2_600 + Layout.preferredHeight: Math.round(14 * DefaultStyle.dp) + Layout.preferredWidth: Math.round(14 * DefaultStyle.dp) + Layout.rightMargin: 8 * DefaultStyle.dp } } + } popup.contentItem: Rectangle { implicitWidth: 280 * DefaultStyle.dp implicitHeight: 20 * DefaultStyle.dp + (setCustomStatus.visible ? 240 * DefaultStyle.dp : setPresence.implicitHeight) diff --git a/Linphone/view/Style/AppIcons.qml b/Linphone/view/Style/AppIcons.qml index 0a25e6a5a..e34b23de1 100644 --- a/Linphone/view/Style/AppIcons.qml +++ b/Linphone/view/Style/AppIcons.qml @@ -139,9 +139,9 @@ QtObject { property string appWindow: "image://internal/app-window.svg" property string bellMwi: "image://internal/bell-simple.svg" property string callForward: "image://internal/call-forward.svg" - property string regitrationDeactivated: "image://internal/regitration_deactivated.svg" - property string regitrationProgress: "image://internal/regitration_progress.svg" - property string regitrationError: "image://internal/regitration_error.svg" + property string registrationDeactivated: "image://internal/registration_deactivated.svg" + property string registrationProgress: "image://internal/registration_progress.svg" + property string registrationError: "image://internal/registration_error.svg" property string presenceOnline: "image://internal/presence_online.svg" property string presenceAway: "image://internal/presence_away.svg" property string presenceBusy: "image://internal/presence_busy.svg"