on xenial help sign in
Made animation of tabs more explicit
commita185a18bb62265c9aff17ca877a9d91cf64ce2c3 authorNick Dedekind <nicholas.dedekind@gmail.com> dateMon 6 Jan 2014, 10:26 (13 years ago) parent9d2229b
2 files changed+4−7
Panel/Indicators.qml+1−6 Panel/MenuContent.qml+3−1
Panel/Indicators.qml+1−6
@@ -143,9 +143,6 @@ Showable {
143143 }
144144 }
145145 if ((!useBuffer || (useBuffer && bufferExceeded)) || indicatorRow.currentItemIndex < 0 || indicatorRow.currentItem == null) {
146− if (initalizeItem) {
147− indicatorRow.currentItem = null;
148− }
149146 indicatorRow.currentItem = currentItem;
150147 }
151148
@@ -155,9 +152,6 @@ Showable {
155152 }
156153 indicatorRow.currentItemOffset = 1 - (distanceFromRightEdge * 2);
157154 } else {
158− if (initalizeItem) {
159− indicatorRow.currentItem = null;
160− }
161155 indicatorRow.setDefaultItem();
162156 indicatorRow.currentItemOffset = 0;
163157 }
@@ -342,6 +336,7 @@ Showable {
342336 if (hideAnimation.running) {
343337 indicators.state = "initial";
344338 initalizeItem = true;
339+ menuContent.animateNextMenuChange = false;
345340 }
346341 }
347342 }
Panel/MenuContent.qml+3−1
@@ -33,6 +33,7 @@ MainView {
3333 property int contentReleaseInterval: 20000
3434 property bool activeHeader: false
3535 property alias visibleIndicators: visibleIndicatorsModel.visible
36+ property bool animateNextMenuChange: false
3637
3738 width: units.gu(40)
3839 height: units.gu(42)
@@ -41,11 +42,12 @@ MainView {
4142 var filteredIndex = filteredIndicators.mapFromSource(index)
4243
4344 if (tabs.selectedTabIndex !== filteredIndex) {
44− if (tabs.selectedTabIndex == -1) {
45+ if (tabs.selectedTabIndex == -1 || !animateNextMenuChange) {
4546 tabs.tabBar.animate = false;
4647 }
4748 tabs.selectedTabIndex = filteredIndex;
4849 tabs.tabBar.animate = true;
50+ animateNextMenuChange = true;
4951 }
5052 }
5153