on xenial help sign in
implement this binding in qml so it's easier to override
721aac9Albert Astals
Dash/DashApps.qml+1−2
@@ -17,7 +17,6 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import Utils 0.1
19import Utils 0.1
20−import ListViewWithPageHeader 0.1
21import "../Components"
20import "../Components"
22import "../Components/ListItems"
21import "../Components/ListItems"
23import "Apps"
22import "Apps"
@@ -113,7 +112,7 @@ ScopeView {
113 "ApplicationsFilterGrid": applicationsFilterGrid,
112 "ApplicationsFilterGrid": applicationsFilterGrid,
114 }
113 }
115
114
116− ListViewWithPageHeader {
115+ ScopeListView {
117 id: categoryView
116 id: categoryView
118 anchors.fill: parent
117 anchors.fill: parent
119 model: SortFilterProxyModel {
118 model: SortFilterProxyModel {
Dash/DashHome.qml+1−2
@@ -17,7 +17,6 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import Utils 0.1
19import Utils 0.1
20−import ListViewWithPageHeader 0.1
21import "../Components"
20import "../Components"
22import "../Components/ListItems"
21import "../Components/ListItems"
23import "../Applications"
22import "../Applications"
@@ -131,7 +130,7 @@ ScopeView {
131 "VideosGrid": videosGrid,
130 "VideosGrid": videosGrid,
132 }
131 }
133
132
134− ListViewWithPageHeader {
133+ ScopeListView {
135 id: listView
134 id: listView
136 anchors.fill: parent
135 anchors.fill: parent
137 model: categoryListModel
136 model: categoryListModel
Dash/DashMusic.qml+1−2
@@ -16,7 +16,6 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19−import ListViewWithPageHeader 0.1
20import "../Components"
19import "../Components"
21import "../Components/ListItems" as ListItems
20import "../Components/ListItems" as ListItems
22import "Music"
21import "Music"
@@ -65,7 +64,7 @@ ScopeView {
65 }
64 }
66 }
65 }
67
66
68− ListViewWithPageHeader {
67+ ScopeListView {
69 id: categoryView
68 id: categoryView
70 anchors.fill: parent
69 anchors.fill: parent
71 model: scopeView.categories
70 model: scopeView.categories
Dash/DashVideos.qml+1−2
@@ -16,7 +16,6 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19−import ListViewWithPageHeader 0.1
20import "../Components"
19import "../Components"
21import "../Components/ListItems" as ListItems
20import "../Components/ListItems" as ListItems
22import "Video"
21import "Video"
@@ -98,7 +97,7 @@ ScopeView {
98 }
97 }
99 }
98 }
100
99
101− ListViewWithPageHeader {
100+ ScopeListView {
102 id: categoryView
101 id: categoryView
103 anchors.fill: parent
102 anchors.fill: parent
104 model: scopeView.categories
103 model: scopeView.categories
Dash/GenericScopeView.qml+1−2
@@ -16,7 +16,6 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19−import ListViewWithPageHeader 0.1
20import "../Components"
19import "../Components"
21import "../Components/ListItems" as ListItems
20import "../Components/ListItems" as ListItems
22import "../Components/IconUtil.js" as IconUtil
21import "../Components/IconUtil.js" as IconUtil
@@ -44,7 +43,7 @@ ScopeView {
44 }
43 }
45 }
44 }
46
45
47− ListViewWithPageHeader {
46+ ScopeListView {
48 id: categoryView
47 id: categoryView
49 anchors.fill: parent
48 anchors.fill: parent
50 model: scopeView.categories
49 model: scopeView.categories
Dash/ScopeListView.qmlnew file+23
@@ -0,0 +1,23 @@
1+/*
2+ * Copyright (C) 2013 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.0
18+import ListViewWithPageHeader 0.1
19+
20+ListViewWithPageHeader {
21+ maximumFlickVelocity: height * 10
22+ flickDeceleration: height * 2
23+}
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp−2
@@ -724,8 +724,6 @@ void ListViewWithPageHeader::onContentWidthChanged()
724
724
725void ListViewWithPageHeader::onHeightChanged()
725void ListViewWithPageHeader::onHeightChanged()
726{
726{
727− setMaximumFlickVelocity(height() * 10);
728− setFlickDeceleration(height() * 2);
729 polish();
727 polish();
730}
728}
731
729