@@ -19,37 +19,29 @@ import Ubuntu.Components 0.1
19import Unity.Indicators 0.1 as Indicators
19import Unity.Indicators 0.1 as Indicators
20import "../Components"
20import "../Components"
23− id: indicatorItem
23+ id: root
25− property alias widgetSource: loader.source
25+ property alias widgetSource: root.source
26 property bool dimmed: false
26 property bool dimmed: false
27 property var indicatorProperties: undefined
27 property var indicatorProperties: undefined
28− property bool indicatorVisible: loader.item ? loader.item.enabled : false
28+ property bool indicatorVisible: item ? item.enabled : false
29 property string identifier
29 property string identifier
31 opacity: dimmed ? 0.4 : 1
31 opacity: dimmed ? 0.4 : 1
32 Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.BriskDuration } }
32 Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.BriskDuration } }
34− width: loader.item ? loader.item.width : 0
39− onLoaded: {
34+ onLoaded: {
40− item.height = Qt.binding(function() { return indicatorItem.height; });
42− for(var pName in indicatorProperties) {
35+ for(var pName in indicatorProperties) {
43− if (item.hasOwnProperty(pName)) {
36+ if (item.hasOwnProperty(pName)) {
44− item[pName] = indicatorProperties[pName];
37+ item[pName] = indicatorProperties[pName];
49− Binding {
42+ Binding {
50− target: loader.item
43+ target: item
51− property: "objectName"
44+ property: "objectName"
52− value: identifier + "-widget"
45+ value: identifier + "-widget"