on xenial help sign in
Remove some other orientation-specific changes
37d688dGerry Boland
qml/Dash/DashContent.qml+3−53
@@ -85,70 +85,20 @@ Item {
85
85
86 anchors.fill: parent
86 anchors.fill: parent
87
87
88− Timer {
89− id: resizeTimer
90− interval: 100
91− repeat: false
92− onTriggered: {
93− dashContentList.currentIndex = dashContentList.currentIndexBeforeResize;
94− resetCurrentIndexTimer.stop();
95− dashContentList.currentIndexBeforeResize = -1;
96− }
97− }
98− Timer {
99− id: resetCurrentIndexTimer
100− interval: 1
101− repeat: false
102− onTriggered: {
103− dashContentList.currentIndex = dashContentList.currentIndexBeforeResize;
104− }
105− }
106−
107− function onSizeChanged() {
108− if (!resizeTimer.running) {
109− dashContentList.currentIndexBeforeResize = dashContentList.currentIndex;
110− resizeTimer.start();
111− } else {
112− resizeTimer.restart();
113− }
114− }
115−
116− onWidthChanged: {
117− onSizeChanged();
118− dashContentList.width = dashContentListHolder.width;
119− }
120−
121− onHeightChanged: {
122− onSizeChanged();
123− dashContentList.height = dashContentListHolder.height;
124− }
125−
126 ListView {
88 ListView {
127 id: dashContentList
89 id: dashContentList
128 objectName: "dashContentList"
90 objectName: "dashContentList"
129
91
130− interactive: dashContent.scopes.loaded && !previewListView.open && currentItem && !currentItem.moving
92+ interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving
131− && !resizeTimer.running
132−
133− property int currentIndexBeforeResize: -1
134− onCurrentIndexChanged: {
135− if (resizeTimer.running && currentIndex != currentIndexBeforeResize) {
136− // Bogus ListView currentIndex change caused by the resize.
137− // Work around this bug by resetting it to its value before the resize
138− // took place.
139− // But we have to do it outside its own onChanged slot, hence the timer.
140− resetCurrentIndexTimer.start();
141− }
142− }
143
93
144− //anchors.fill: parent /* working around the "currentIndex change due to resize" bug */
94+ anchors.fill: parent
145 model: dashContent.model
95 model: dashContent.model
146 orientation: ListView.Horizontal
96 orientation: ListView.Horizontal
147 boundsBehavior: Flickable.DragAndOvershootBounds
97 boundsBehavior: Flickable.DragAndOvershootBounds
148 flickDeceleration: units.gu(625)
98 flickDeceleration: units.gu(625)
149 maximumFlickVelocity: width * 5
99 maximumFlickVelocity: width * 5
150 snapMode: ListView.SnapOneItem
100 snapMode: ListView.SnapOneItem
151− highlightMoveDuration: 0 //250 /* working around the "currentIndex change due to resize" bug */
101+ highlightMoveDuration: 250
152 highlightRangeMode: ListView.StrictlyEnforceRange
102 highlightRangeMode: ListView.StrictlyEnforceRange
153 // TODO Investigate if we can switch to a smaller cache buffer when/if UbuntuShape gets more performant
103 // TODO Investigate if we can switch to a smaller cache buffer when/if UbuntuShape gets more performant
154 cacheBuffer: 1073741823
104 cacheBuffer: 1073741823
qml/Greeter/Greeter.qml−14
@@ -30,20 +30,6 @@ Showable {
30 // 1 when fully shown and 0 when fully hidden
30 // 1 when fully shown and 0 when fully hidden
31 property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
31 property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
32
32
33− // Adjust the "hidden" position of the greeter when its size changes,
34− // otherwise parts of it might show up on the screen.
35− // Also, showProgress property will show up a greater than 0 value in such case, and
36− // that must not happen
37− onWidthChanged: {
38− if (!shown) {
39− if (x > 0) {
40− x = width;
41− } else {
42− x = -width;
43− }
44− }
45− }
46−
47 showAnimation: StandardAnimation { property: "x"; to: 0 }
33 showAnimation: StandardAnimation { property: "x"; to: 0 }
48 hideAnimation: __leftHideAnimation
34 hideAnimation: __leftHideAnimation
49
35