summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiPengKun <pengkun.li@jp.alps.com>2017-11-10 09:21:19 +0900
committerLiPengKun <pengkun.li@jp.alps.com>2017-11-13 09:03:14 +0900
commita610446ed8866b2be8234ee0e466fa7e29410946 (patch)
tree5acd34250ed2e67676edede38c02c251cd71b5d4
parentfad0af3fd59883c58224d1ffd1a6aa9668f75851 (diff)
QML: Bluetooth patch to limit device name length
This is a patch to fix the Bluetooth issue that long device name may cover pair button Change-Id: Ida0fd980cf3308be959eb74ea30e11beeffd5453 Signed-off-by: LiPengKun <pengkun.li@jp.alps.com>
-rw-r--r--app/bluetooth/Bluetooth.qml9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/bluetooth/Bluetooth.qml b/app/bluetooth/Bluetooth.qml
index 7d0778a..04c9284 100644
--- a/app/bluetooth/Bluetooth.qml
+++ b/app/bluetooth/Bluetooth.qml
@@ -265,9 +265,16 @@ SettingPage {
Column {
anchors.left: parent.left
anchors.leftMargin: 80
+ TextMetrics {
+ id: textMetrics
+ font.family: "Arial"
+ elide: Text.ElideRight
+ elideWidth: 140
+ text: deviceName
+ }
Text {
id: btName
- text: deviceName
+ text: textMetrics.elidedText
color: '#66FF99'
font.pixelSize: 48
}