~ci-train-bot/unity8/unity8-ubuntu-zesty-2373

« back to all changes in this revision

Viewing changes to Panel/Indicators/DefaultIndicatorWidget.qml

  • Committer: Michael Terry
  • Date: 2013-09-18 20:59:03 UTC
  • mfrom: (332 trunk)
  • mto: (138.5.2 split-logrotate)
  • mto: This revision was merged to the branch mainline in revision 933.
  • Revision ID: michael.terry@canonical.com-20130918205903-tzfqs8nju98mcjr3
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
Indicators.IndicatorWidget {
25
25
    id: indicatorWidget
26
26
 
 
27
    enabled:true
27
28
    width: itemRow.width + units.gu(0.5)
28
29
 
29
30
    property alias label: itemLabel.text
63
64
 
64
65
    onActionStateChanged: {
65
66
        if (action == undefined || !action.valid) {
66
 
            enabled = false;
67
67
            return;
68
68
        }
69
69
 
70
70
        if (action.state == undefined) {
71
 
            label = "";
72
 
            iconSource = "";
73
 
            enabled = false;
74
71
            return;
75
72
        }
76
73
 
77
74
        label = action.state[Indicators.ActionState.Label];
78
75
        iconSource = "image://theme/" + action.state[Indicators.ActionState.IconSource];
79
 
        enabled = action.state[Indicators.ActionState.Visible];
80
76
    }
81
77
}