From a610446ed8866b2be8234ee0e466fa7e29410946 Mon Sep 17 00:00:00 2001 From: LiPengKun Date: Fri, 10 Nov 2017 09:21:19 +0900 Subject: 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 --- app/bluetooth/Bluetooth.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 } -- cgit 1.2.3-korg