Index: sources/gui/qml/pages/settings/SettingsBluetoothCuff.qml =================================================================== diff -u -re4a0e2fc4c7ae0cbce0d670772276bf7f5ff3845 -rb252cd2777aadbce2d04aa32cc275f193de0cf52 --- sources/gui/qml/pages/settings/SettingsBluetoothCuff.qml (.../SettingsBluetoothCuff.qml) (revision e4a0e2fc4c7ae0cbce0d670772276bf7f5ff3845) +++ sources/gui/qml/pages/settings/SettingsBluetoothCuff.qml (.../SettingsBluetoothCuff.qml) (revision b252cd2777aadbce2d04aa32cc275f193de0cf52) @@ -45,67 +45,42 @@ property int labelHeight: 25 anchors.top : _image.top - anchors.topMargin : 100 anchors.left : parent.left anchors.leftMargin : 50 spacing : 10 Label { id : _deviceTitle - text : vBluetooth.devicePair ? qsTr("Found Paired Device") : qsTr("Found Device") + text : qsTr("Devices") } - Row { id : _deviceNameRow - leftPadding : 25 - Label { id : _deviceNameLabel - height : _deviceColumn.labelHeight - text : qsTr("Name") - labelWidth : 125 - verticalAlignment : Text.AlignVCenter + ListView { id: _deviceList + ScrollBar { + anchors.fill: _deviceList + flickable : _deviceList } - Label { id : _deviceName - height : _deviceColumn.labelHeight - text : ": " + vBluetooth.deviceName - font.pixelSize : Fonts.fontPixelNotification - verticalAlignment : Text.AlignVCenter + clip : true + spacing : 5 + width : 500 + height : 300 + model : vBluetooth + delegate: TouchRect { id: _deviceTouchrect + clip : true + radius : 10 + width : 500 - 10 // give room to scrollbar + height : 70 + color : Colors.transparent + border.color: pair ? Colors.borderButton : Colors.borderButtonUnselected + text { + text: addr + '\n' + name + anchors.horizontalCenter: undefined + anchors.left: _deviceTouchrect.left + anchors.leftMargin: 5 + } + onClicked: { + vBluetooth.didDeviceSelect(addr, name); + } } } - Row { - leftPadding : 25 - Label { id : _deviceAddressLabel - height : _deviceColumn.labelHeight - text : qsTr("Address") - labelWidth : 125 - verticalAlignment : Text.AlignVCenter - - } - Label { id : _deviceAddress - height : _deviceColumn.labelHeight - text : ": " + vBluetooth.deviceAddr - font.pixelSize : Fonts.fontPixelNotification - verticalAlignment : Text.AlignVCenter - } - } } - // Column { id : _debugColumn - // anchors.bottom : _scanButton.top - // anchors.left : parent.left - // anchors.leftMargin : 100 - // - // TouchRect { id : _connectButton - // text.text : qsTr("CONNECT") - // width : 300 - // isDefault : false - // enabled : vBluetooth.scanEnabled - // onClicked : vBluetooth.doConnectToDevice() - // } - // - // TouchRect { id : _notifyButton - // text.text : qsTr("NOTIFY") - // width : 300 - // isDefault : false - // enabled : vBluetooth.scanEnabled - // onClicked : vBluetooth.doEnableNotify() - // } - // } TouchRect { id : _scanButton anchors.bottom : parent.bottom anchors.bottomMargin: Variables.mainMenuHeight * 2 + Variables.minVGap