@@ -27,6 +27,8 @@ Item {
2727 property alias row: row
2828 property QtObject indicatorsModel: null
2929 property var visibleIndicators: defined
30+ property int overFlowWidth: width
31+ property bool showAll: false
3032
3133 width: units.gu(40)
3234 height: units.gu(3)
@@ -42,6 +44,15 @@ Item {
4244 }
4345 }
4446
47+ Timer {
48+ id: allVisible
49+ interval: 1000
50+
51+ onTriggered: {
52+ showAll = false;
53+ }
54+ }
55+
4556 Row {
4657 id: row
4758
@@ -54,16 +65,31 @@ Item {
5465 objectName: "rowRepeater"
5566 model: indicatorsModel ? indicatorsModel : undefined
5667
68+ property int lastCount: 0
69+ onCountChanged: {
70+ if (lastCount < count) {
71+ showAll = true;
72+ allVisible.start();
73+ }
74+ lastCount = count;
75+ }
76+
5777 Item {
5878 id: itemWrapper
5979 height: indicatorRow.height
6080 width: indicatorItem.width
6181 visible: indicatorItem.indicatorVisible
82+ opacity: 1.0
83+ y: 0
84+ state: "standard"
6285
6386 property int ownIndex: index
6487 property alias highlighted: indicatorItem.highlighted
6588 property alias dimmed: indicatorItem.dimmed
6689
90+ property bool hidden: !showAll && !indicatorItem.highlighted && (indicatorRow.state == "locked" || indicatorRow.state == "commit")
91+ property bool overflow: row.width - itemWrapper.x > overFlowWidth
92+
6793 IndicatorItem {
6894 id: indicatorItem
6995 height: parent.height
@@ -87,22 +113,35 @@ Item {
87113 }
88114 indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
89115 indicatorRow.visibleIndicatorsChanged();
116+
117+ if (indicatorVisible) {
118+ showAll = true;
119+ allVisible.start();
120+ }
90121 }
91122 }
92123
93− opacity: {
94− if (!indicatorItem.highlighted && (indicatorRow.state == "locked" || indicatorRow.state == "commit")) {
95− return 0.0;
96− } else {
97− return 1.0;
124+ states: [
125+ State {
126+ name: "standard"
127+ when: !hidden && !overflow
128+ },
129+ State {
130+ name: "overflow"
131+ when: hidden || overflow
132+ PropertyChanges { target: itemWrapper; opacity: 0.0 }
98133 }
99− }
100− Behavior on opacity {
101− StandardAnimation {
102− // flow away from current index
103− duration: (rowRepeater.count - Math.abs(indicatorRow.currentItemIndex - index)) * (500/rowRepeater.count)
104− }
105− }
134+ ]
135+
136+ transitions: [
137+ Transition {
138+ StandardAnimation {
139+ target: itemWrapper
140+ property: "opacity"
141+ duration: 300
142+ }
143+ }
144+ ]
106145 }
107146 }
108147 }