Browse Source

qml: add hint property to QRScan

master
Sander van Grieken 3 years ago
parent
commit
49df18c613
  1. 17
      electrum/gui/qml/components/controls/QRScan.qml

17
electrum/gui/qml/components/controls/QRScan.qml

@ -10,6 +10,7 @@ Item {
property bool active: false property bool active: false
property string url property string url
property string scanData property string scanData
property string hint
property bool _pointsVisible property bool _pointsVisible
@ -41,6 +42,20 @@ Item {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
color: Qt.rgba(0,0,0,0.5) color: Qt.rgba(0,0,0,0.5)
} }
InfoTextArea {
visible: scanner.hint
background.opacity: 0.5
iconStyle: InfoTextArea.IconStyle.None
anchors {
top: parent.top
topMargin: constants.paddingXLarge
left: parent.left
leftMargin: constants.paddingXXLarge
right: parent.right
rightMargin: constants.paddingXXLarge
}
text: scanner.hint
}
} }
Image { Image {
@ -151,7 +166,7 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
console.log('Scan page initialized') console.log('enumerating cameras')
QtMultimedia.availableCameras.forEach(function(item) { QtMultimedia.availableCameras.forEach(function(item) {
console.log('cam found, id=' + item.deviceId + ' name=' + item.displayName) console.log('cam found, id=' + item.deviceId + ' name=' + item.displayName)
console.log('pos=' + item.position + ' orientation=' + item.orientation) console.log('pos=' + item.position + ' orientation=' + item.orientation)

Loading…
Cancel
Save