mainview: hide qr code generation button for sip account

Change-Id: I4a63c5d719dfbaf4d4d8b3c276e5cafe749ffcf0
This commit is contained in:
Ming Rui Zhang
2020-09-14 13:32:03 -04:00
parent e5bafb5472
commit 5e87b43e78
2 changed files with 12 additions and 5 deletions

View File

@@ -161,16 +161,19 @@ ComboBox {
buttonImageHeight: height - 8
buttonImageWidth: width - 8
radius: height / 2
width: 24
height: 24
visible: AccountAdapter.currentAccountType === Profile.Type.RING
toolTipText: JamiStrings.displayQRCode
hoverEnabled: true
source: "qrc:/images/qrcode.png"
backgroundColor: "white"
onClicked: {
qrDialog.open()
if (visible)
qrDialog.open()
}
}
@@ -187,9 +190,12 @@ ComboBox {
width: 25
height: 25
source: !mainViewWindow.inSettingsView ? "qrc:/images/icons/round-settings-24px.svg" :
"qrc:/images/icons/round-close-24px.svg"
toolTipText: !mainViewWindow.inSettingsView ? JamiStrings.openSettings : JamiStrings.closeSettings
source: !mainViewWindow.inSettingsView ?
"qrc:/images/icons/round-settings-24px.svg" :
"qrc:/images/icons/round-close-24px.svg"
toolTipText: !mainViewWindow.inSettingsView ?
JamiStrings.openSettings :
JamiStrings.closeSettings
hoverEnabled: true
backgroundColor: "white"

View File

@@ -43,7 +43,8 @@ Dialog {
fillMode: Image.PreserveAspectFit
source: {
if (AccountAdapter.currentAccountId)
if (AccountAdapter.currentAccountId &&
AccountAdapter.currentAccountType === Profile.Type.RING)
return "image://qrImage/account_" + AccountAdapter.currentAccountId
return ""
}