Add proper widget objectNames.
commitea18cc4bc181641cb591db59a1dd54d6ded7d5a9
authorAllan LeSage <allan.lesage@canonical.com>
dateTue 29 Oct 2013, 15:40 (13 years ago)
parent1ddb114
Panel/IndicatorItem.qml+7
@@ -27,6 +27,7 @@ Item {
2727 property bool dimmed: false
2828 property var indicatorProperties: undefined
2929 property bool indicatorVisible: loader.item ? loader.item.enabled : false
30+ property string identifier: undefined
3031
3132 opacity: dimmed ? 0.4 : 1
3233 Behavior on opacity { StandardAnimation {} }
@@ -45,6 +46,12 @@ Item {
4546 }
4647 }
4748 }
49+
50+ Binding {
51+ target: loader.item
52+ property: "objectName"
53+ value: model.identifier + "-widget"
54+ }
4855 }
4956
5057 Rectangle {
Panel/IndicatorRow.qml+1
@@ -92,6 +92,7 @@ Item {
9292
9393 IndicatorItem {
9494 id: indicatorItem
95+ identifier: model.identifier
9596 height: parent.height
9697
9798 highlighted: indicatorRow.state != "initial" ? itemWrapper.ownIndex == indicatorRow.currentItemIndex : false