fix registration state ui in account list
This commit is contained in:
parent
ecf79d530a
commit
46f19d5d64
7 changed files with 55 additions and 54 deletions
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
|
|
@ -1764,19 +1764,19 @@ QUrl Utils::getRegistrationStateIcon(LinphoneEnums::RegistrationState state) {
|
||||||
QUrl registrationStateIcon;
|
QUrl registrationStateIcon;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case LinphoneEnums::RegistrationState::Refreshing:
|
case LinphoneEnums::RegistrationState::Refreshing:
|
||||||
registrationStateIcon = Utils::getAppIcon("regitrationProgress");
|
registrationStateIcon = Utils::getAppIcon("registrationProgress");
|
||||||
break;
|
break;
|
||||||
case LinphoneEnums::RegistrationState::Progress:
|
case LinphoneEnums::RegistrationState::Progress:
|
||||||
registrationStateIcon = Utils::getAppIcon("regitrationProgress");
|
registrationStateIcon = Utils::getAppIcon("registrationProgress");
|
||||||
break;
|
break;
|
||||||
case LinphoneEnums::RegistrationState::Failed:
|
case LinphoneEnums::RegistrationState::Failed:
|
||||||
registrationStateIcon = Utils::getAppIcon("regitrationError");
|
registrationStateIcon = Utils::getAppIcon("registrationError");
|
||||||
break;
|
break;
|
||||||
case LinphoneEnums::RegistrationState::Cleared:
|
case LinphoneEnums::RegistrationState::Cleared:
|
||||||
registrationStateIcon = Utils::getAppIcon("regitrationDeactivated");
|
registrationStateIcon = Utils::getAppIcon("registrationDeactivated");
|
||||||
break;
|
break;
|
||||||
case LinphoneEnums::RegistrationState::None:
|
case LinphoneEnums::RegistrationState::None:
|
||||||
registrationStateIcon = Utils::getAppIcon("regitrationDeactivated");
|
registrationStateIcon = Utils::getAppIcon("registrationDeactivated");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
registrationStateIcon = QUrl();
|
registrationStateIcon = QUrl();
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ Loader{
|
||||||
z: 1
|
z: 1
|
||||||
source: account
|
source: account
|
||||||
? (account.core?.registrationState !== LinphoneEnums.RegistrationState.Ok
|
? (account.core?.registrationState !== LinphoneEnums.RegistrationState.Ok
|
||||||
? account.core?.registrationStateIcon
|
? account.core?.registrationIcon
|
||||||
: account.core?.presenceIcon)
|
: account.core?.presenceIcon)
|
||||||
: (contact
|
: (contact
|
||||||
? contact.core?.presenceIcon
|
? contact.core?.presenceIcon
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,11 @@ Control.Control{
|
||||||
Layout.maximumWidth: Math.round(150 * DefaultStyle.dp)
|
Layout.maximumWidth: Math.round(150 * DefaultStyle.dp)
|
||||||
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
|
Layout.preferredHeight: Math.round(24 * DefaultStyle.dp)
|
||||||
Layout.preferredWidth: presenceOrRegistrationText.implicitWidth + Math.round(50 * DefaultStyle.dp)
|
Layout.preferredWidth: presenceOrRegistrationText.implicitWidth + Math.round(50 * DefaultStyle.dp)
|
||||||
contentItem:
|
enabled: mainItem.account && mainItem.account.core.registrationState === LinphoneEnums.RegistrationState.Ok
|
||||||
Rectangle{
|
onEnabledChanged: if(!enabled) close()
|
||||||
|
contentItem: Rectangle {
|
||||||
id: presenceBar
|
id: presenceBar
|
||||||
property bool isRegistered: mainItem.account?.core.registrationState == LinphoneEnums.RegistrationState.Ok
|
property bool isRegistered: mainItem.account?.core.registrationState === LinphoneEnums.RegistrationState.Ok
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
radius: Math.round(15 * DefaultStyle.dp)
|
radius: Math.round(15 * DefaultStyle.dp)
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -79,7 +80,7 @@ Control.Control{
|
||||||
Layout.preferredHeight: 11 * DefaultStyle.dp
|
Layout.preferredHeight: 11 * DefaultStyle.dp
|
||||||
source: presenceBar.isRegistered
|
source: presenceBar.isRegistered
|
||||||
? mainItem.account.core.presenceIcon
|
? mainItem.account.core.presenceIcon
|
||||||
: mainItem.account?.core.registrationStateIcon || ""
|
: mainItem.account?.core.registrationIcon || ""
|
||||||
Layout.leftMargin: 8 * DefaultStyle.dp
|
Layout.leftMargin: 8 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
|
|
||||||
|
|
@ -139,9 +139,9 @@ QtObject {
|
||||||
property string appWindow: "image://internal/app-window.svg"
|
property string appWindow: "image://internal/app-window.svg"
|
||||||
property string bellMwi: "image://internal/bell-simple.svg"
|
property string bellMwi: "image://internal/bell-simple.svg"
|
||||||
property string callForward: "image://internal/call-forward.svg"
|
property string callForward: "image://internal/call-forward.svg"
|
||||||
property string regitrationDeactivated: "image://internal/regitration_deactivated.svg"
|
property string registrationDeactivated: "image://internal/registration_deactivated.svg"
|
||||||
property string regitrationProgress: "image://internal/regitration_progress.svg"
|
property string registrationProgress: "image://internal/registration_progress.svg"
|
||||||
property string regitrationError: "image://internal/regitration_error.svg"
|
property string registrationError: "image://internal/registration_error.svg"
|
||||||
property string presenceOnline: "image://internal/presence_online.svg"
|
property string presenceOnline: "image://internal/presence_online.svg"
|
||||||
property string presenceAway: "image://internal/presence_away.svg"
|
property string presenceAway: "image://internal/presence_away.svg"
|
||||||
property string presenceBusy: "image://internal/presence_busy.svg"
|
property string presenceBusy: "image://internal/presence_busy.svg"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue