diff options
-rw-r--r-- | examples/bluetooth/scanner/Button.qml | 8 | ||||
-rw-r--r-- | examples/bluetooth/scanner/scanner.qml | 20 |
2 files changed, 19 insertions, 9 deletions
diff --git a/examples/bluetooth/scanner/Button.qml b/examples/bluetooth/scanner/Button.qml index a3debfca..17fb38b5 100644 --- a/examples/bluetooth/scanner/Button.qml +++ b/examples/bluetooth/scanner/Button.qml @@ -48,9 +48,7 @@ Rectangle { property alias text: label.text signal clicked() - - height: 60 - width: 105 + height: label.height*1.1 color: active ? "#1c56f3" : "white" @@ -61,9 +59,11 @@ Rectangle { id: label text: "Full Discovery" font.bold: true - anchors.fill: parent + font.pointSize: 17 + width: parent.width wrapMode: Text.WordWrap horizontalAlignment: Text.AlignHCenter + anchors.centerIn: parent } MouseArea { diff --git a/examples/bluetooth/scanner/scanner.qml b/examples/bluetooth/scanner/scanner.qml index 6341e23d..67aaecf0 100644 --- a/examples/bluetooth/scanner/scanner.qml +++ b/examples/bluetooth/scanner/scanner.qml @@ -74,7 +74,7 @@ Item { width: top.width * 0.7; anchors.horizontalCenter: parent.horizontalCenter anchors.top: top.top; - height: 30; + height: text.height*1.2; radius: 5 color: "#1c56f3" visible: btModel.running @@ -83,6 +83,7 @@ Item { id: text text: "Scanning" font.bold: true + font.pointSize: 20 anchors.centerIn: parent } @@ -127,9 +128,9 @@ Item { anchors.leftMargin: 5 Text { id: bttext - text: name; + text: deviceName ? deviceName : name font.family: "FreeSerif" - font.pointSize: 12 + font.pointSize: 16 } Text { @@ -150,7 +151,8 @@ Item { visible: opacity !== 0 opacity: btDelegate.expended ? 1 : 0.0 text: get_details(service) - font: bttext.font + font.family: "FreeSerif" + font.pointSize: 14 Behavior on opacity { NumberAnimation { duration: 200} } @@ -172,20 +174,28 @@ Item { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter - spacing: 20 + anchors.bottomMargin: 5 + spacing: 10 Button { id: fdButton + width: top.width/3*0.9 + //mdButton has longest text + height: mdButton.height text: "Full Discovery" onClicked: btModel.discoveryMode = BluetoothDiscoveryModel.FullServiceDiscovery } Button { id: mdButton + width: top.width/3*0.9 text: "Minimal Discovery" onClicked: btModel.discoveryMode = BluetoothDiscoveryModel.MinimalServiceDiscovery } Button { id: devButton + width: top.width/3*0.9 + //mdButton has longest text + height: mdButton.height text: "Device Discovery" onClicked: btModel.discoveryMode = BluetoothDiscoveryModel.DeviceDiscovery } |