@@ -27,6 +27,8 @@ Item {
27 property alias row: row
27 property alias row: row
28 property QtObject indicatorsModel: null
28 property QtObject indicatorsModel: null
29 property var visibleIndicators: defined
29 property var visibleIndicators: defined
30+ property int overFlowWidth: width
31+ property bool showAll: false
31 width: units.gu(40)
33 width: units.gu(40)
32 height: units.gu(3)
34 height: units.gu(3)
@@ -42,6 +44,15 @@ Item {
@@ -54,16 +65,31 @@ Item {
54 objectName: "rowRepeater"
65 objectName: "rowRepeater"
55 model: indicatorsModel ? indicatorsModel : undefined
66 model: indicatorsModel ? indicatorsModel : undefined
68+ property int lastCount: 0
70+ if (lastCount < count) {
58 id: itemWrapper
78 id: itemWrapper
59 height: indicatorRow.height
79 height: indicatorRow.height
60 width: indicatorItem.width
80 width: indicatorItem.width
61 visible: indicatorItem.indicatorVisible
81 visible: indicatorItem.indicatorVisible
63 property int ownIndex: index
86 property int ownIndex: index
64 property alias highlighted: indicatorItem.highlighted
87 property alias highlighted: indicatorItem.highlighted
65 property alias dimmed: indicatorItem.dimmed
88 property alias dimmed: indicatorItem.dimmed
90+ property bool hidden: !showAll && !indicatorItem.highlighted && (indicatorRow.state == "locked" || indicatorRow.state == "commit")
91+ property bool overflow: row.width - itemWrapper.x > overFlowWidth
67 IndicatorItem {
93 IndicatorItem {
68 id: indicatorItem
94 id: indicatorItem
69 height: parent.height
95 height: parent.height
@@ -87,22 +113,35 @@ Item {
88 indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
114 indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
89 indicatorRow.visibleIndicatorsChanged();
115 indicatorRow.visibleIndicatorsChanged();
117+ if (indicatorVisible) {
93− opacity: {
124+ states: [
94− if (!indicatorItem.highlighted && (indicatorRow.state == "locked" || indicatorRow.state == "commit")) {
125+ State {
95− return 0.0;
126+ name: "standard"
96− } else {
127+ when: !hidden && !overflow
131+ when: hidden || overflow
132+ PropertyChanges { target: itemWrapper; opacity: 0.0 }
100− Behavior on opacity {
135+
101− StandardAnimation {
138+ StandardAnimation {
102− // flow away from current index
139+ target: itemWrapper
103− duration: (rowRepeater.count - Math.abs(indicatorRow.currentItemIndex - index)) * (500/rowRepeater.count)
140+ property: "opacity"