From 77072a18d462082bd5f975fd60c335f9372f2a56 Mon Sep 17 00:00:00 2001 From: Brian Jones Date: Wed, 11 Apr 2012 12:36:36 -0700 Subject: [PATCH] Your phone in Your Devices will now be dim if it's only paired, and will be highlighted if it's connected. --- qml/DeviceDelegateActive.qml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/qml/DeviceDelegateActive.qml b/qml/DeviceDelegateActive.qml index 84f30f1..8471492 100644 --- a/qml/DeviceDelegateActive.qml +++ b/qml/DeviceDelegateActive.qml @@ -22,17 +22,35 @@ Item { signal clicked() signal close() + Connections { + target: adapter + onModemOnlineChanged: { + + //If the modem gets powered down for any reason, attempt to power it again to maintain connection + if (!adapter.modemOnline) + { + mainText.color = "grey" + availableBluetoothItem.source = "/usr/share/hfdialer/images/ivi_btn-list-inactive.png" + } + else + { + mainText.color = "white" + availableBluetoothItem.source = "/usr/share/hfdialer/images/ivi_btn-list.png" + } + } + } + Image { id: availableBluetoothItem - source: "/usr/share/hfdialer/images/ivi_btn-list-inactive.png" - + source: !adapter.modemOnline? "/usr/share/hfdialer/images/ivi_btn-list-inactive.png" : availableBluetoothItem.source = "/usr/share/hfdialer/images/ivi_btn-list.png" anchors {fill: parent; leftMargin: 8; rightMargin: 8; topMargin: 8} MouseArea { id: clickArea anchors.fill: parent + onPressed: { availableBluetoothItem.source = "/usr/share/hfdialer/images/ivi_btn-list.png" } @@ -57,7 +75,7 @@ Item { font.pixelSize: parent.height / 2 style: Text.Outline styleColor: "#3B3A39" - color: "white" + color: !adapter.modemOnline? "grey" : "white" text: root.deviceName elide: Text.ElideRight } -- 2.7.4