on xenial help sign in
Merge
2f55286Albert Astals
plugins/Dash/listviewwithpageheader.cpp+8
@@ -330,6 +330,11 @@ int ListViewWithPageHeader::stickyHeaderHeight() const
330 return m_topSectionItem ? m_topSectionItem->height() : 0;
330 return m_topSectionItem ? m_topSectionItem->height() : 0;
331}
331}
332
332
333+qreal ListViewWithPageHeader::headerItemShownHeight() const
334+{
335+ return m_headerItemShownHeight;
336+}
337+
333void ListViewWithPageHeader::positionAtBeginning()
338void ListViewWithPageHeader::positionAtBeginning()
334{
339{
335 if (m_delegateModel->count() <= 0)
340 if (m_delegateModel->count() <= 0)
@@ -396,6 +401,7 @@ void ListViewWithPageHeader::showHeader()
396 firstItem->setY(firstItem->y() - m_headerItemShownHeight);
401 firstItem->setY(firstItem->y() - m_headerItemShownHeight);
397 layout();
402 layout();
398 }
403 }
404+ Q_EMIT headerItemShownHeightChanged();
399 }
405 }
400 m_contentYAnimation->setTo(to);
406 m_contentYAnimation->setTo(to);
401 contentYAnimationType = ContentYAnimationShowHeader;
407 contentYAnimationType = ContentYAnimationShowHeader;
@@ -544,6 +550,7 @@ void ListViewWithPageHeader::adjustHeader(qreal diff)
544 m_headerItem->setY(-m_minYExtent);
550 m_headerItem->setY(-m_minYExtent);
545 }
551 }
546 }
552 }
553+ Q_EMIT headerItemShownHeightChanged();
547 } else {
554 } else {
548 // Stick the header item to the top when dragging down
555 // Stick the header item to the top when dragging down
549 m_headerItem->setY(contentY());
556 m_headerItem->setY(contentY());
@@ -1096,6 +1103,7 @@ void ListViewWithPageHeader::headerHeightChanged(qreal newHeaderHeight, qreal ol
1096 m_headerItemShownHeight = qBound(static_cast<qreal>(0.), m_headerItemShownHeight, newHeaderHeight);
1103 m_headerItemShownHeight = qBound(static_cast<qreal>(0.), m_headerItemShownHeight, newHeaderHeight);
1097 updateClipItem();
1104 updateClipItem();
1098 adjustMinYExtent();
1105 adjustMinYExtent();
1106+ Q_EMIT headerItemShownHeightChanged();
1099 } else {
1107 } else {
1100 if (oldHeaderY + oldHeaderHeight > contentY()) {
1108 if (oldHeaderY + oldHeaderHeight > contentY()) {
1101 // If the header is shown because its position
1109 // If the header is shown because its position
plugins/Dash/listviewwithpageheader.h+3
@@ -53,6 +53,7 @@ class ListViewWithPageHeader : public QQuickFlickable, public QQuickItemChangeLi
53 Q_PROPERTY(QString sectionProperty READ sectionProperty WRITE setSectionProperty NOTIFY sectionPropertyChanged)
53 Q_PROPERTY(QString sectionProperty READ sectionProperty WRITE setSectionProperty NOTIFY sectionPropertyChanged)
54 Q_PROPERTY(bool forceNoClip READ forceNoClip WRITE setForceNoClip NOTIFY forceNoClipChanged)
54 Q_PROPERTY(bool forceNoClip READ forceNoClip WRITE setForceNoClip NOTIFY forceNoClipChanged)
55 Q_PROPERTY(int stickyHeaderHeight READ stickyHeaderHeight NOTIFY stickyHeaderHeightChanged)
55 Q_PROPERTY(int stickyHeaderHeight READ stickyHeaderHeight NOTIFY stickyHeaderHeightChanged)
56+ Q_PROPERTY(qreal headerItemShownHeight READ headerItemShownHeight NOTIFY headerItemShownHeightChanged)
56
57
57 friend class ListViewWithPageHeaderTest;
58 friend class ListViewWithPageHeaderTest;
58 friend class ListViewWithPageHeaderTestSection;
59 friend class ListViewWithPageHeaderTestSection;
@@ -81,6 +82,7 @@ public:
81 void setForceNoClip(bool noClip);
82 void setForceNoClip(bool noClip);
82
83
83 int stickyHeaderHeight() const;
84 int stickyHeaderHeight() const;
85+ qreal headerItemShownHeight() const;
84
86
85 Q_INVOKABLE void positionAtBeginning();
87 Q_INVOKABLE void positionAtBeginning();
86 Q_INVOKABLE void showHeader();
88 Q_INVOKABLE void showHeader();
@@ -100,6 +102,7 @@ Q_SIGNALS:
100 void sectionPropertyChanged();
102 void sectionPropertyChanged();
101 void forceNoClipChanged();
103 void forceNoClipChanged();
102 void stickyHeaderHeightChanged();
104 void stickyHeaderHeightChanged();
105+ void headerItemShownHeightChanged();
103
106
104protected:
107protected:
105 void componentComplete() override;
108 void componentComplete() override;
po/unity8.pot+22−18
@@ -8,7 +8,7 @@ msgid ""
8msgstr ""
8msgstr ""
9"Project-Id-Version: unity8\n"
9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"
10"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2014-08-05 19:54+0200\n"
11+"POT-Creation-Date: 2014-08-08 11:17+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -113,15 +113,11 @@ msgstr ""
113msgid "DONE"
113msgid "DONE"
114msgstr ""
114msgstr ""
115
115
116−#: qml/Components/SeeMore.qml:35
117−msgid "See more"
118−msgstr ""
119−
120−#: qml/Components/SeeMore.qml:58 qml/Dash/GenericScopeView.qml:354
116+#: qml/Dash/GenericScopeView.qml:358
121msgid "See less"
117msgid "See less"
122msgstr ""
118msgstr ""
123
119
124−#: qml/Dash/GenericScopeView.qml:354
120+#: qml/Dash/GenericScopeView.qml:358
125msgid "See all"
121msgid "See all"
126msgstr ""
122msgstr ""
127
123
@@ -145,15 +141,15 @@ msgstr ""
145msgid "Send"
141msgid "Send"
146msgstr ""
142msgstr ""
147
143
148−#: qml/Dash/ScopesOverview.qml:187
144+#: qml/Dash/ScopesOverview.qml:200
149msgid "Manage Dash"
145msgid "Manage Dash"
150msgstr ""
146msgstr ""
151
147
152−#: qml/Dash/ScopesOverview.qml:392
148+#: qml/Dash/ScopesOverview.qml:405
153msgid "Done"
149msgid "Done"
154msgstr ""
150msgstr ""
155
151
156−#: qml/Dash/ScopesOverview.qml:418
152+#: qml/Dash/ScopesOverview.qml:431
157msgid "Store"
153msgid "Store"
158msgstr ""
154msgstr ""
159
155
@@ -189,11 +185,11 @@ msgstr ""
189msgid "Speaking..."
185msgid "Speaking..."
190msgstr ""
186msgstr ""
191
187
192−#: qml/Notifications/NotificationMenuItemFactory.qml:97
188+#: qml/Notifications/NotificationMenuItemFactory.qml:100
193msgid "Show password"
189msgid "Show password"
194msgstr ""
190msgstr ""
195
191
196−#: qml/Notifications/NotificationMenuItemFactory.qml:112
192+#: qml/Notifications/NotificationMenuItemFactory.qml:115
197msgid "Please enter SIM PIN"
193msgid "Please enter SIM PIN"
198msgstr ""
194msgstr ""
199
195
@@ -205,30 +201,38 @@ msgstr ""
205msgid "Conference"
201msgid "Conference"
206msgstr ""
202msgstr ""
207
203
208−#: qml/Panel/Indicators/MenuItemFactory.qml:577
204+#: qml/Panel/Indicators/MenuItemFactory.qml:651
209msgid "In queue…"
205msgid "In queue…"
210msgstr ""
206msgstr ""
211
207
212−#: qml/Panel/Indicators/MenuItemFactory.qml:581
208+#: qml/Panel/Indicators/MenuItemFactory.qml:655
213msgid "Downloading"
209msgid "Downloading"
214msgstr ""
210msgstr ""
215
211
216−#: qml/Panel/Indicators/MenuItemFactory.qml:583
212+#: qml/Panel/Indicators/MenuItemFactory.qml:657
217msgid "Paused, tap to resume"
213msgid "Paused, tap to resume"
218msgstr ""
214msgstr ""
219
215
220−#: qml/Panel/Indicators/MenuItemFactory.qml:585
216+#: qml/Panel/Indicators/MenuItemFactory.qml:659
221msgid "Canceled"
217msgid "Canceled"
222msgstr ""
218msgstr ""
223
219
224−#: qml/Panel/Indicators/MenuItemFactory.qml:587
220+#: qml/Panel/Indicators/MenuItemFactory.qml:661
225msgid "Finished"
221msgid "Finished"
226msgstr ""
222msgstr ""
227
223
228−#: qml/Panel/Indicators/MenuItemFactory.qml:589
224+#: qml/Panel/Indicators/MenuItemFactory.qml:663
229msgid "Failed, tap to retry"
225msgid "Failed, tap to retry"
230msgstr ""
226msgstr ""
231
227
228+#: qml/Panel/Indicators/ModemInfoItem.qml:105
229+msgid "Unlock SIM"
230+msgstr ""
231+
232+#: qml/Panel/Indicators/RoamingIndication.qml:27
233+msgid "Roaming"
234+msgstr ""
235+
232#: qml/Panel/SearchIndicator.qml:27
236#: qml/Panel/SearchIndicator.qml:27
233msgid "Search"
237msgid "Search"
234msgstr ""
238msgstr ""
qml/Dash/Dash.qml+13−1
@@ -150,7 +150,7 @@ Showable {
150 height: sourceItem.height
150 height: sourceItem.height
151 width: sourceItem.width
151 width: sourceItem.width
152 opacity: 1 - overviewController.progress
152 opacity: 1 - overviewController.progress
153− visible: overviewController.progress != 0
153+ visible: overviewController.progress != 0 && scopeItem.scope === null
154 live: false
154 live: false
155 }
155 }
156
156
@@ -324,6 +324,18 @@ Showable {
324 }
324 }
325 }
325 }
326
326
327+ Image {
328+ source: "graphics/overview_hint.png"
329+ anchors.horizontalCenter: parent.horizontalCenter
330+ opacity: (scopeItem.scope ? scopeItem.pageHeaderTotallyVisible : dashContent.pageHeaderTotallyVisible) &&
331+ (overviewDragHandle.enabled || overviewController.progress != 0) ? 1 : 0
332+ Behavior on opacity {
333+ enabled: overviewController.progress == 0
334+ UbuntuNumberAnimation {}
335+ }
336+ y: parent.height - height * (1 - overviewController.progress * 4)
337+ }
338+
327 EdgeDragArea {
339 EdgeDragArea {
328 id: overviewDragHandle
340 id: overviewDragHandle
329 objectName: "overviewDragHandle"
341 objectName: "overviewDragHandle"
qml/Dash/DashContent.qml+2
@@ -31,6 +31,8 @@ Item {
31 dashContentList.currentItem.item.previewShown : false
31 dashContentList.currentItem.item.previewShown : false
32 readonly property bool processing: dashContentList.currentItem && dashContentList.currentItem.item
32 readonly property bool processing: dashContentList.currentItem && dashContentList.currentItem.item
33 && dashContentList.currentItem.item.processing || false
33 && dashContentList.currentItem.item.processing || false
34+ readonly property bool pageHeaderTotallyVisible: dashContentList.currentItem && dashContentList.currentItem.item
35+ && dashContentList.currentItem.item.pageHeaderTotallyVisible || false
34
36
35 signal scopeLoaded(string scopeId)
37 signal scopeLoaded(string scopeId)
36 signal gotoScope(string scopeId)
38 signal gotoScope(string scopeId)
qml/Dash/GenericScopeView.qml+4
@@ -37,6 +37,7 @@ FocusScope {
37 readonly property alias previewShown: previewListView.open
37 readonly property alias previewShown: previewListView.open
38 property int paginationCount: 0
38 property int paginationCount: 0
39 property int paginationIndex: 0
39 property int paginationIndex: 0
40+ property alias pageHeaderTotallyVisible: categoryView.pageHeaderTotallyVisible
40
41
41 property var scopeStyle: ScopeStyle {
42 property var scopeStyle: ScopeStyle {
42 style: scope ? scope.customizations : {}
43 style: scope ? scope.customizations : {}
@@ -152,6 +153,9 @@ FocusScope {
152
153
153 property string expandedCategoryId: ""
154 property string expandedCategoryId: ""
154
155
156+ readonly property bool pageHeaderTotallyVisible: scopeView.showPageHeader &&
157+ ((headerItemShownHeight == 0 && categoryView.contentY <= categoryView.originY) || (headerItemShownHeight == pageHeaderLoader.item.height))
158+
155 delegate: ListItems.Base {
159 delegate: ListItems.Base {
156 id: baseItem
160 id: baseItem
157 objectName: "dashCategory" + category
161 objectName: "dashCategory" + category
qml/Dash/ScopesOverview.qml+10−3
@@ -82,6 +82,13 @@ Item {
82 scopesOverviewXYScaler.y = 0;
82 scopesOverviewXYScaler.y = 0;
83 scopesOverviewXYScaler.opacity = 1;
83 scopesOverviewXYScaler.opacity = 1;
84 }
84 }
85+ onGotoScope: {
86+ if (tabBar.currentTab == 0) {
87+ root.favoriteSelected(scopeId);
88+ } else {
89+ root.allFavoriteSelected(scopeId);
90+ }
91+ }
85 }
92 }
86
93
87 Binding {
94 Binding {
@@ -409,13 +416,13 @@ Item {
409 right: parent.right
416 right: parent.right
410 verticalCenter: parent.verticalCenter
417 verticalCenter: parent.verticalCenter
411 }
418 }
412− Image {
419+ Icon {
413 id: storeImage
420 id: storeImage
414− source: "graphics/apps-scope.png"
421+ name: "ubuntu-store-symbolic"
422+ color: "white"
415 anchors.horizontalCenter: parent.horizontalCenter
423 anchors.horizontalCenter: parent.horizontalCenter
416 width: units.gu(2)
424 width: units.gu(2)
417 height: units.gu(2)
425 height: units.gu(2)
418− fillMode: Image.Stretch
419 }
426 }
420 Label {
427 Label {
421 id: storeLabel
428 id: storeLabel
qml/Dash/graphics/apps-scope.pngdeleted

Binary file not shown.

qml/Dash/graphics/overview_hint@27.pngnew file

Binary file not shown.