Browse Source

qml: keystore icon indicator for watch-only

master
Sander van Grieken 3 years ago
parent
commit
969f84913e
  1. 1
      electrum/gui/qml/components/Constants.qml
  2. 5
      electrum/gui/qml/components/WalletDetails.qml
  3. 3
      electrum/gui/qml/qewallet.py

1
electrum/gui/qml/components/Constants.qml

@ -18,6 +18,7 @@ Item {
readonly property int fontSizeXLarge: 22
readonly property int fontSizeXXLarge: 28
readonly property int iconSizeXSmall: 12
readonly property int iconSizeSmall: 16
readonly property int iconSizeMedium: 24
readonly property int iconSizeLarge: 32

5
electrum/gui/qml/components/WalletDetails.qml

@ -295,6 +295,11 @@ Pane {
text: '#' + index
visible: keystores.count > 1
}
Image {
Layout.preferredWidth: constants.iconSizeXSmall
Layout.preferredHeight: constants.iconSizeXSmall
source: modelData.watch_only ? '../../icons/eye1.png' : '../../icons/key.png'
}
}
TextHighlightPane {
Layout.fillWidth: true

3
electrum/gui/qml/qewallet.py

@ -345,7 +345,8 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
result.append({
'derivation_prefix': k.get_derivation_prefix() or '',
'master_pubkey': k.get_master_public_key() or '',
'fingerprint': k.get_root_fingerprint() or ''
'fingerprint': k.get_root_fingerprint() or '',
'watch_only': k.is_watching_only()
})
return result

Loading…
Cancel
Save