on xenial help sign in
Made animation of tabs more explicit
a185a18Nick Dedekind
Panel/Indicators.qml+1−6
@@ -143,9 +143,6 @@ Showable {
143 }
143 }
144 }
144 }
145 if ((!useBuffer || (useBuffer && bufferExceeded)) || indicatorRow.currentItemIndex < 0 || indicatorRow.currentItem == null) {
145 if ((!useBuffer || (useBuffer && bufferExceeded)) || indicatorRow.currentItemIndex < 0 || indicatorRow.currentItem == null) {
146− if (initalizeItem) {
147− indicatorRow.currentItem = null;
148− }
149 indicatorRow.currentItem = currentItem;
146 indicatorRow.currentItem = currentItem;
150 }
147 }
151
148
@@ -155,9 +152,6 @@ Showable {
155 }
152 }
156 indicatorRow.currentItemOffset = 1 - (distanceFromRightEdge * 2);
153 indicatorRow.currentItemOffset = 1 - (distanceFromRightEdge * 2);
157 } else {
154 } else {
158− if (initalizeItem) {
159− indicatorRow.currentItem = null;
160− }
161 indicatorRow.setDefaultItem();
155 indicatorRow.setDefaultItem();
162 indicatorRow.currentItemOffset = 0;
156 indicatorRow.currentItemOffset = 0;
163 }
157 }
@@ -342,6 +336,7 @@ Showable {
342 if (hideAnimation.running) {
336 if (hideAnimation.running) {
343 indicators.state = "initial";
337 indicators.state = "initial";
344 initalizeItem = true;
338 initalizeItem = true;
339+ menuContent.animateNextMenuChange = false;
345 }
340 }
346 }
341 }
347 }
342 }
Panel/MenuContent.qml+3−1
@@ -33,6 +33,7 @@ MainView {
33 property int contentReleaseInterval: 20000
33 property int contentReleaseInterval: 20000
34 property bool activeHeader: false
34 property bool activeHeader: false
35 property alias visibleIndicators: visibleIndicatorsModel.visible
35 property alias visibleIndicators: visibleIndicatorsModel.visible
36+ property bool animateNextMenuChange: false
36
37
37 width: units.gu(40)
38 width: units.gu(40)
38 height: units.gu(42)
39 height: units.gu(42)
@@ -41,11 +42,12 @@ MainView {
41 var filteredIndex = filteredIndicators.mapFromSource(index)
42 var filteredIndex = filteredIndicators.mapFromSource(index)
42
43
43 if (tabs.selectedTabIndex !== filteredIndex) {
44 if (tabs.selectedTabIndex !== filteredIndex) {
44− if (tabs.selectedTabIndex == -1) {
45+ if (tabs.selectedTabIndex == -1 || !animateNextMenuChange) {
45 tabs.tabBar.animate = false;
46 tabs.tabBar.animate = false;
46 }
47 }
47 tabs.selectedTabIndex = filteredIndex;
48 tabs.selectedTabIndex = filteredIndex;
48 tabs.tabBar.animate = true;
49 tabs.tabBar.animate = true;
50+ animateNextMenuChange = true;
49 }
51 }
50 }
52 }
51
53