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

View File

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