Revert lp:~unity-team/unity8/flickables-speed-workaround to avoid risk in RTM.
This change was not accepted for release into RTM, need to back it out for now.
Approved by: Albert Astals Cid
commit1309cbd08453ce1744b507cfbc9e5ac6a436f051
authorMichał Sawicz <michal.sawicz@canonical.com>
dateThu 30 Oct 2014, 21:42 (12 years ago)
parent6cf1f39eabe465
qml/Components/Carousel.qml+3−2
@@ -17,7 +17,6 @@
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import "carousel.js" as CarouselJS
20−import "Flickables" as Flickables
2120
2221/*! The Carousel component presents the items of a model in a carousel view. It's similar to a
2322 cover flow. But it stops at it's boundaries (therefore no PathView is used).
@@ -64,7 +63,7 @@ Item {
6463 and footer item to compensate that.
6564
6665 The scaling of the items is controlled by the variable continuousIndex, described below. */
67− Flickables.ListView {
66+ ListView {
6867 id: listView
6968 objectName: "listView"
7069
@@ -136,6 +135,8 @@ Item {
136135
137136 boundsBehavior: Flickable.DragOverBounds
138137 cacheBuffer: carousel.cacheBuffer
138+ flickDeceleration: Math.max(1500 * Math.pow(realWidth / referenceWidth, 1.5), 1500) // 1500 is platform default
139+ maximumFlickVelocity: Math.max(2500 * Math.pow(realWidth / referenceWidth, 1.5), 2500) // 2500 is platform default
139140 orientation: ListView.Horizontal
140141
141142 function getXFromContinuousIndex(index) {
qml/Components/Flickables/Flickable.qmldeleted−23
@@ -1,23 +0,0 @@
1−/*
2− * Copyright (C) 2014 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.3 as QtQuick
18−import Ubuntu.Components 1.1
19−
20−QtQuick.Flickable {
21− flickDeceleration: 1500 * units.gridUnit / 8
22− maximumFlickVelocity: 2500 * units.gridUnit / 8
23−}
qml/Components/Flickables/GridView.qmldeleted−25
@@ -1,25 +0,0 @@
1−/*
2− * Copyright (C) 2014 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.3 as QtQuick
18−import Ubuntu.Components 1.1
19−
20−QtQuick.GridView {
21− // Attached components and usages like GridView.onRemove are known not to work
22− // please use GridView directly from QtQuick if needed
23− flickDeceleration: 1500 * units.gridUnit / 8
24− maximumFlickVelocity: 2500 * units.gridUnit / 8
25−}
qml/Components/Flickables/ListView.qmldeleted−25
@@ -1,25 +0,0 @@
1−/*
2− * Copyright (C) 2014 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.3 as QtQuick
18−import Ubuntu.Components 1.1
19−
20−QtQuick.ListView {
21− // Attached components and usages like ListView.onRemove are known not to work
22− // please use ListView directly from QtQuick if needed
23− flickDeceleration: 1500 * units.gridUnit / 8
24− maximumFlickVelocity: 2500 * units.gridUnit / 8
25−}
qml/Components/Flickables/ListViewWithPageHeader.qmldeleted−23
@@ -1,23 +0,0 @@
1−/*
2− * Copyright (C) 2014 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import Dash 0.1
18−import Ubuntu.Components 1.1
19−
20−ListViewWithPageHeader {
21− flickDeceleration: 1500 * units.gridUnit / 8
22− maximumFlickVelocity: 2500 * units.gridUnit / 8
23−}
qml/Components/ResponsiveGridView.qml+1−2
@@ -16,7 +16,6 @@
1616
1717import QtQuick 2.3
1818import Ubuntu.Components 0.1
19−import "Flickables" as Flickables
2019
2120/*
2221 Essentially a GridView where you can specify the maximum number of columns it can have.
@@ -56,7 +55,7 @@ Item {
5655 return rows * height
5756 }
5857
59− Flickables.GridView {
58+ GridView {
6059 id: gridView
6160 objectName: "responsiveGridViewGrid"
6261 anchors {
qml/Components/ZoomableImage.qml+2−2
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19−import "Flickables" as Flickables
19+import "../Components"
2020
2121/*! \brief Zoomable for image.
2222
@@ -32,7 +32,7 @@ Item {
3232 property alias scaleTo: lazyImage.scaleTo
3333 property alias asynchronous: lazyImage.asynchronous
3434
35− Flickables.Flickable {
35+ Flickable {
3636 id: flickable
3737 objectName: "flickable"
3838 clip: true
qml/Dash/CardHorizontalList.qml+1−2
@@ -17,7 +17,6 @@
1717import QtQuick 2.2
1818import Ubuntu.Components 1.1
1919import "../Components"
20−import "../Components/Flickables" as Flickables
2120
2221DashRenderer {
2322 id: root
@@ -26,7 +25,7 @@ DashRenderer {
2625 collapsedHeight: expandedHeight
2726 clip: true
2827
29− Flickables.ListView {
28+ ListView {
3029 id: listView
3130 anchors {
3231 fill: parent
qml/Dash/DashContent.qml+3−2
@@ -19,7 +19,6 @@ import Ubuntu.Components 0.1
1919import Unity 0.2
2020import Utils 0.1
2121import "../Components"
22−import "../Components/Flickables" as Flickables
2322
2423Item {
2524 id: dashContent
@@ -99,7 +98,7 @@ Item {
9998 anchors.fill: parent
10099 }
101100
102− Flickables.ListView {
101+ ListView {
103102 id: dashContentList
104103 objectName: "dashContentList"
105104
@@ -108,6 +107,8 @@ Item {
108107 anchors.fill: parent
109108 orientation: ListView.Horizontal
110109 boundsBehavior: Flickable.DragAndOvershootBounds
110+ flickDeceleration: units.gu(625)
111+ maximumFlickVelocity: width * 5
111112 snapMode: ListView.SnapOneItem
112113 highlightMoveDuration: 250
113114 highlightRangeMode: ListView.StrictlyEnforceRange
qml/Dash/DashNavigationButton.qml+1−2
@@ -16,7 +16,6 @@
1616
1717import QtQuick 2.2
1818import Ubuntu.Components 1.1
19−import "../Components/Flickables" as Flickables
2019
2120AbstractButton {
2221 id: root
@@ -76,7 +75,7 @@ AbstractButton {
7675 }
7776
7877 // navigationListView is outside root
79− Flickables.ListView {
78+ ListView {
8079 id: navigationListView
8180 objectName: "navigationListView"
8281 visible: height > 0
qml/Dash/DashNavigationList.qml+1−2
@@ -17,7 +17,6 @@
1717import QtQuick 2.2
1818import Ubuntu.Components 1.1
1919import "../Components"
20−import "../Components/Flickables" as Flickables
2120
2221Item {
2322 id: root
@@ -46,7 +45,7 @@ Item {
4645 }
4746 }
4847
49− Flickables.Flickable {
48+ Flickable {
5049 id: flickable
5150
5251 anchors.fill: parent
qml/Dash/PageHeader.qml+1−2
@@ -21,7 +21,6 @@ import Ubuntu.Components.Popups 1.0
2121import Ubuntu.Components.ListItems 1.0
2222import "../Components"
2323import "../Components/SearchHistoryModel"
24−import "../Components/Flickables" as Flickables
2524
2625Item {
2726 id: root
@@ -128,7 +127,7 @@ Item {
128127 }
129128 }
130129
131− Flickables.Flickable {
130+ Flickable {
132131 id: headerContainer
133132 objectName: "headerContainer"
134133 clip: contentY < height
qml/Dash/PreviewListView.qml+3−2
@@ -18,7 +18,6 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import Unity 0.2
2020import "../Components"
21−import "../Components/Flickables" as Flickables
2221import "Previews" as Previews
2322
2423Item {
@@ -53,7 +52,7 @@ Item {
5352 onBackClicked: root.backClicked()
5453 }
5554
56− Flickables.ListView {
55+ ListView {
5756 id: previewListView
5857 objectName: "listView"
5958 anchors {
@@ -67,6 +66,8 @@ Item {
6766 snapMode: ListView.SnapOneItem
6867 boundsBehavior: Flickable.DragAndOvershootBounds
6968 highlightMoveDuration: 250
69+ flickDeceleration: units.gu(625)
70+ maximumFlickVelocity: width * 5
7071 cacheBuffer: 0
7172
7273 property bool open: false
qml/Dash/Previews/Preview.qml+1−2
@@ -16,7 +16,6 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19−import "../../Components/Flickables" as Flickables
2019
2120/*! \brief This component constructs the Preview UI.
2221 *
@@ -64,7 +63,7 @@ Item {
6463 Repeater {
6564 model: previewModel
6665
67− delegate: Flickables.ListView {
66+ delegate: ListView {
6867 id: column
6968 anchors { top: parent.top; bottom: parent.bottom }
7069 width: row.columnWidth
qml/Dash/Previews/PreviewImageGallery.qml+2−3
@@ -17,7 +17,6 @@
1717import QtQuick 2.0
1818import Ubuntu.Components 1.1
1919import "../../Components"
20−import "../../Components/Flickables" as Flickables
2120
2221/*! This preview widget shows a horizontal list of images.
2322 * The URIs for the images should be an array in widgetData["sources"].
@@ -29,7 +28,7 @@ PreviewWidget {
2928
3029 property Item rootItem: QuickUtils.rootItem(root)
3130
32− Flickables.ListView {
31+ ListView {
3332 id: previewImageListView
3433 objectName: "previewImageListView"
3534 spacing: units.gu(1)
@@ -103,7 +102,7 @@ PreviewWidget {
103102 UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
104103 }
105104
106− Flickables.ListView {
105+ ListView {
107106 id: slideShowListView
108107 objectName: "slideShowListView"
109108 anchors.fill: parent
qml/Dash/ScopeListView.qml+6−3
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import "../Components/Flickables" as Flickables
17+import QtQuick 2.0
18+import Dash 0.1
1819
19−Flickables.ListViewWithPageHeader {
20+ListViewWithPageHeader {
21+ maximumFlickVelocity: height * 10
22+ flickDeceleration: height * 2
2023 cacheBuffer: Number.MAX_VALUE
2124}
qml/Dash/ScopeSettingsPage.qml+1−2
@@ -18,7 +18,6 @@ import QtQuick 2.2
1818import Ubuntu.Components 1.1
1919import Unity 0.2
2020import "../Components"
21−import "../Components/Flickables" as Flickables
2221import "ScopeSettings"
2322
2423Item {
@@ -40,7 +39,7 @@ Item {
4039 onBackClicked: root.backClicked()
4140 }
4241
43− Flickables.ListView {
42+ ListView {
4443 id: scopeSettings
4544 objectName: "scopeSettings"
4645 anchors {
qml/Dash/ScopesOverviewAll.qml+1−2
@@ -16,9 +16,8 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19−import "../Components/Flickables" as Flickables
2019
21−Flickables.Flickable {
20+Flickable {
2221 id: root
2322
2423 property alias model: cardGrid.model
qml/Dash/ScopesOverviewFavorites.qml+2−4
@@ -14,11 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
19−import "../Components/Flickables" as Flickables
17+import QtQuick 2.0
2018
21−Flickables.Flickable {
19+Flickable {
2220 id: root
2321
2422 signal clicked(int index, var result, var itemModel)
qml/Greeter/LoginList.qml+2−2
@@ -18,7 +18,6 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import LightDM 0.1 as LightDM
2020import "../Components"
21−import "../Components/Flickables" as Flickables
2221
2322Item {
2423 id: root
@@ -69,7 +68,7 @@ Item {
6968 antialiasing: true
7069 }
7170
72− Flickables.ListView {
71+ ListView {
7372 id: userList
7473 objectName: "userList"
7574
@@ -79,6 +78,7 @@ Item {
7978 preferredHighlightEnd: userList.height / 2 - root.highlightedHeight / 2
8079 highlightRangeMode: ListView.StrictlyEnforceRange
8180 highlightMoveDuration: root.moveDuration
81+ flickDeceleration: 10000
8282
8383 readonly property bool movingInternally: moveTimer.running || userList.moving
8484
qml/Hud/Hud.qml+1−2
@@ -19,7 +19,6 @@ import Ubuntu.Components 0.1
1919import HudClient 0.1
2020
2121import "../Components"
22−import "../Components/Flickables" as Flickables
2322
2423Item {
2524 id: hud
@@ -401,7 +400,7 @@ Item {
401400 }
402401 progress: MathUtils.clamp((y - hudShowable.y + height - units.gu(8))/elementsYSliding, 0, 1)
403402
404− Flickables.Flickable {
403+ Flickable {
405404 anchors.left: parent.left
406405 anchors.right: parent.right
407406 contentHeight: resultList.height
qml/Hud/HudParametrizedActionsPage.qml+1−2
@@ -18,7 +18,6 @@ import QtQuick 2.0
1818import Ubuntu.Components 1.1
1919import Ubuntu.Components.Themes.Ambiance 1.1
2020import "../Components"
21−import "../Components/Flickables" as Flickables
2221
2322Item {
2423 property alias header: header.title
@@ -75,7 +74,7 @@ Item {
7574 return values
7675 }
7776
78− Flickables.Flickable {
77+ Flickable {
7978 anchors.top: parent.top
8079 anchors.bottom: buttons.top
8180 anchors.left: parent.left
qml/Launcher/LauncherPanel.qml+1−2
@@ -21,7 +21,6 @@ import Unity.Launcher 0.1
2121import Ubuntu.Components.Popups 0.1
2222import "../Components/ListItems"
2323import "../Components/"
24−import "../Components/Flickables" as Flickables
2524
2625Rectangle {
2726 id: root
@@ -76,7 +75,7 @@ Rectangle {
7675 anchors.fill: parent
7776 clip: true
7877
79− Flickables.ListView {
78+ ListView {
8079 id: launcherListView
8180 objectName: "launcherListView"
8281 anchors {
qml/Notifications/Notification.qml+1−2
@@ -20,7 +20,6 @@ import Ubuntu.Components 1.1
2020import Unity.Notifications 1.0
2121import QMenuModel 0.1
2222import Utils 0.1
23−import "../Components/Flickables" as Flickables
2423
2524import Ubuntu.Components.ListItems 0.1 as ListItem
2625
@@ -520,7 +519,7 @@ Item {
520519 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
521520 expanded: false
522521 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
523− comboList: Flickables.Flickable {
522+ comboList: Flickable {
524523 // this has to be wrapped inside a flickable
525524 // to work around a feature/bug? of the
526525 // ComboButton SDK-element, making a regular
qml/Notifications/Notifications.qml+1−2
@@ -19,9 +19,8 @@ import Ubuntu.Components 0.1
1919import Unity.Notifications 1.0 as UnityNotifications
2020import Utils 0.1
2121import "../Components"
22−import "../Components/Flickables" as Flickables
2322
24−Flickables.ListView {
23+ListView {
2524 id: notificationList
2625
2726 objectName: "notificationList"
qml/Panel/IndicatorPage.qml+1−2
@@ -18,7 +18,6 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1 as Components
1919import Unity.Indicators 0.1 as Indicators
2020import "Indicators"
21−import "../Components/Flickables" as Flickables
2221
2322IndicatorBase {
2423 id: main
@@ -63,7 +62,7 @@ IndicatorBase {
6362 }
6463 }
6564
66− Flickables.ListView {
65+ ListView {
6766 id: mainMenu
6867 objectName: "mainMenu"
6968 model: menuStack.rootMenu
qml/Panel/Indicators/client/IndicatorsList.qml+1−2
@@ -22,7 +22,6 @@ import Ubuntu.Components 0.1
2222import Ubuntu.Components.ListItems 0.1 as ListItem
2323import Unity.Indicators 0.1 as Indicators
2424import "../.."
25−import "../../../Components/Flickables" as Flickables
2625
2726Page {
2827 id: page
@@ -36,7 +35,7 @@ Page {
3635 Component.onCompleted: load(profile)
3736 }
3837
39− Flickables.ListView {
38+ ListView {
4039 id: mainMenu
4140 objectName: "mainMenu"
4241 anchors.fill: parent
qml/Panel/Indicators/client/IndicatorsTree.qml+1−2
@@ -21,7 +21,6 @@ import QtQuick 2.0
2121import Ubuntu.Components 0.1
2222import Unity.Indicators 0.1 as Indicators
2323import ".."
24−import "../../../Components/Flickables" as Flickables
2524
2625IndicatorBase {
2726 id: root
@@ -31,7 +30,7 @@ IndicatorBase {
3130 model: root.menuModel
3231 }
3332
34− Flickables.Flickable {
33+ Flickable {
3534 anchors.fill: parent
3635 contentHeight: all_data.height
3736 clip:true
qml/Panel/MenuContent.qml+2−2
@@ -20,7 +20,7 @@ import Ubuntu.Components 1.1
2020import Unity.Indicators 0.1 as Indicators
2121import Utils 0.1
2222import "../Components"
23−import "../Components/Flickables" as Flickables
23+import "Indicators"
2424
2525Rectangle {
2626 id: content
@@ -36,7 +36,7 @@ Rectangle {
3636 listViewContent.currentIndex = currentMenuIndex;
3737 }
3838
39− Flickables.ListView {
39+ ListView {
4040 id: listViewContent
4141 objectName: "indicatorsContentListView"
4242 anchors.fill: parent
qml/Stages/PhoneStage.qml+1−2
@@ -21,7 +21,6 @@ import Unity.Application 0.1
2121import Unity.Session 0.1
2222import Utils 0.1
2323import "../Components"
24−import "../Components/Flickables" as Flickables
2524
2625Rectangle {
2726 id: root
@@ -121,7 +120,7 @@ Rectangle {
121120
122121 }
123122
124− Flickables.Flickable {
123+ Flickable {
125124 id: spreadView
126125 objectName: "spreadView"
127126 anchors.fill: parent
qml/Stages/TabletStage.qml+1−2
@@ -20,7 +20,6 @@ import Ubuntu.Gestures 0.1
2020import Unity.Application 0.1
2121import Utils 0.1
2222import "../Components"
23−import "../Components/Flickables" as Flickables
2423
2524Rectangle {
2625 id: root
@@ -154,7 +153,7 @@ Rectangle {
154153 }
155154 }
156155
157− Flickables.Flickable {
156+ Flickable {
158157 id: spreadView
159158 anchors.fill: parent
160159 interactive: (spreadDragArea.status == DirectionalDragArea.Recognized || phase > 1)