on xenial help sign in
Merge
commit26ea6ad60398fe1fc38078b1018efa7b83c51e7f authorAlbert Astals <albert.astals@canonical.com> dateFri 8 Aug 2014, 11:20 (12 years ago) parent5009a762f55286
9 files changed+62−22
plugins/Dash/listviewwithpageheader.cpp+8 plugins/Dash/listviewwithpageheader.h+3 po/unity8.pot+22−18 qml/Dash/Dash.qml+13−1 qml/Dash/DashContent.qml+2 qml/Dash/GenericScopeView.qml+4 qml/Dash/ScopesOverview.qml+10−3 qml/Dash/graphics/apps-scope.png qml/Dash/graphics/overview_hint@27.png
plugins/Dash/listviewwithpageheader.cpp+8
@@ -330,6 +330,11 @@ int ListViewWithPageHeader::stickyHeaderHeight() const
330330 return m_topSectionItem ? m_topSectionItem->height() : 0;
331331}
332332
333+qreal ListViewWithPageHeader::headerItemShownHeight() const
334+{
335+ return m_headerItemShownHeight;
336+}
337+
333338void ListViewWithPageHeader::positionAtBeginning()
334339{
335340 if (m_delegateModel->count() <= 0)
@@ -396,6 +401,7 @@ void ListViewWithPageHeader::showHeader()
396401 firstItem->setY(firstItem->y() - m_headerItemShownHeight);
397402 layout();
398403 }
404+ Q_EMIT headerItemShownHeightChanged();
399405 }
400406 m_contentYAnimation->setTo(to);
401407 contentYAnimationType = ContentYAnimationShowHeader;
@@ -544,6 +550,7 @@ void ListViewWithPageHeader::adjustHeader(qreal diff)
544550 m_headerItem->setY(-m_minYExtent);
545551 }
546552 }
553+ Q_EMIT headerItemShownHeightChanged();
547554 } else {
548555 // Stick the header item to the top when dragging down
549556 m_headerItem->setY(contentY());
@@ -1096,6 +1103,7 @@ void ListViewWithPageHeader::headerHeightChanged(qreal newHeaderHeight, qreal ol
10961103 m_headerItemShownHeight = qBound(static_cast<qreal>(0.), m_headerItemShownHeight, newHeaderHeight);
10971104 updateClipItem();
10981105 adjustMinYExtent();
1106+ Q_EMIT headerItemShownHeightChanged();
10991107 } else {
11001108 if (oldHeaderY + oldHeaderHeight > contentY()) {
11011109 // If the header is shown because its position
plugins/Dash/listviewwithpageheader.h+3
@@ -53,6 +53,7 @@ class ListViewWithPageHeader : public QQuickFlickable, public QQuickItemChangeLi
5353 Q_PROPERTY(QString sectionProperty READ sectionProperty WRITE setSectionProperty NOTIFY sectionPropertyChanged)
5454 Q_PROPERTY(bool forceNoClip READ forceNoClip WRITE setForceNoClip NOTIFY forceNoClipChanged)
5555 Q_PROPERTY(int stickyHeaderHeight READ stickyHeaderHeight NOTIFY stickyHeaderHeightChanged)
56+ Q_PROPERTY(qreal headerItemShownHeight READ headerItemShownHeight NOTIFY headerItemShownHeightChanged)
5657
5758 friend class ListViewWithPageHeaderTest;
5859 friend class ListViewWithPageHeaderTestSection;
@@ -81,6 +82,7 @@ public:
8182 void setForceNoClip(bool noClip);
8283
8384 int stickyHeaderHeight() const;
85+ qreal headerItemShownHeight() const;
8486
8587 Q_INVOKABLE void positionAtBeginning();
8688 Q_INVOKABLE void showHeader();
@@ -100,6 +102,7 @@ Q_SIGNALS:
100102 void sectionPropertyChanged();
101103 void forceNoClipChanged();
102104 void stickyHeaderHeightChanged();
105+ void headerItemShownHeightChanged();
103106
104107protected:
105108 void componentComplete() override;
po/unity8.pot+22−18
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: unity8\n"
1010"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"
1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -113,15 +113,11 @@ msgstr ""
113113msgid "DONE"
114114msgstr ""
115115
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
121117msgid "See less"
122118msgstr ""
123119
124−#: qml/Dash/GenericScopeView.qml:354
120+#: qml/Dash/GenericScopeView.qml:358
125121msgid "See all"
126122msgstr ""
127123
@@ -145,15 +141,15 @@ msgstr ""
145141msgid "Send"
146142msgstr ""
147143
148−#: qml/Dash/ScopesOverview.qml:187
144+#: qml/Dash/ScopesOverview.qml:200
149145msgid "Manage Dash"
150146msgstr ""
151147
152−#: qml/Dash/ScopesOverview.qml:392
148+#: qml/Dash/ScopesOverview.qml:405
153149msgid "Done"
154150msgstr ""
155151
156−#: qml/Dash/ScopesOverview.qml:418
152+#: qml/Dash/ScopesOverview.qml:431
157153msgid "Store"
158154msgstr ""
159155
@@ -189,11 +185,11 @@ msgstr ""
189185msgid "Speaking..."
190186msgstr ""
191187
192−#: qml/Notifications/NotificationMenuItemFactory.qml:97
188+#: qml/Notifications/NotificationMenuItemFactory.qml:100
193189msgid "Show password"
194190msgstr ""
195191
196−#: qml/Notifications/NotificationMenuItemFactory.qml:112
192+#: qml/Notifications/NotificationMenuItemFactory.qml:115
197193msgid "Please enter SIM PIN"
198194msgstr ""
199195
@@ -205,30 +201,38 @@ msgstr ""
205201msgid "Conference"
206202msgstr ""
207203
208−#: qml/Panel/Indicators/MenuItemFactory.qml:577
204+#: qml/Panel/Indicators/MenuItemFactory.qml:651
209205msgid "In queue…"
210206msgstr ""
211207
212−#: qml/Panel/Indicators/MenuItemFactory.qml:581
208+#: qml/Panel/Indicators/MenuItemFactory.qml:655
213209msgid "Downloading"
214210msgstr ""
215211
216−#: qml/Panel/Indicators/MenuItemFactory.qml:583
212+#: qml/Panel/Indicators/MenuItemFactory.qml:657
217213msgid "Paused, tap to resume"
218214msgstr ""
219215
220−#: qml/Panel/Indicators/MenuItemFactory.qml:585
216+#: qml/Panel/Indicators/MenuItemFactory.qml:659
221217msgid "Canceled"
222218msgstr ""
223219
224−#: qml/Panel/Indicators/MenuItemFactory.qml:587
220+#: qml/Panel/Indicators/MenuItemFactory.qml:661
225221msgid "Finished"
226222msgstr ""
227223
228−#: qml/Panel/Indicators/MenuItemFactory.qml:589
224+#: qml/Panel/Indicators/MenuItemFactory.qml:663
229225msgid "Failed, tap to retry"
230226msgstr ""
231227
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+
232236#: qml/Panel/SearchIndicator.qml:27
233237msgid "Search"
234238msgstr ""
qml/Dash/Dash.qml+13−1
@@ -150,7 +150,7 @@ Showable {
150150 height: sourceItem.height
151151 width: sourceItem.width
152152 opacity: 1 - overviewController.progress
153− visible: overviewController.progress != 0
153+ visible: overviewController.progress != 0 && scopeItem.scope === null
154154 live: false
155155 }
156156
@@ -324,6 +324,18 @@ Showable {
324324 }
325325 }
326326
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+
327339 EdgeDragArea {
328340 id: overviewDragHandle
329341 objectName: "overviewDragHandle"
qml/Dash/DashContent.qml+2
@@ -31,6 +31,8 @@ Item {
3131 dashContentList.currentItem.item.previewShown : false
3232 readonly property bool processing: dashContentList.currentItem && dashContentList.currentItem.item
3333 && dashContentList.currentItem.item.processing || false
34+ readonly property bool pageHeaderTotallyVisible: dashContentList.currentItem && dashContentList.currentItem.item
35+ && dashContentList.currentItem.item.pageHeaderTotallyVisible || false
3436
3537 signal scopeLoaded(string scopeId)
3638 signal gotoScope(string scopeId)
qml/Dash/GenericScopeView.qml+4
@@ -37,6 +37,7 @@ FocusScope {
3737 readonly property alias previewShown: previewListView.open
3838 property int paginationCount: 0
3939 property int paginationIndex: 0
40+ property alias pageHeaderTotallyVisible: categoryView.pageHeaderTotallyVisible
4041
4142 property var scopeStyle: ScopeStyle {
4243 style: scope ? scope.customizations : {}
@@ -152,6 +153,9 @@ FocusScope {
152153
153154 property string expandedCategoryId: ""
154155
156+ readonly property bool pageHeaderTotallyVisible: scopeView.showPageHeader &&
157+ ((headerItemShownHeight == 0 && categoryView.contentY <= categoryView.originY) || (headerItemShownHeight == pageHeaderLoader.item.height))
158+
155159 delegate: ListItems.Base {
156160 id: baseItem
157161 objectName: "dashCategory" + category
qml/Dash/ScopesOverview.qml+10−3
@@ -82,6 +82,13 @@ Item {
8282 scopesOverviewXYScaler.y = 0;
8383 scopesOverviewXYScaler.opacity = 1;
8484 }
85+ onGotoScope: {
86+ if (tabBar.currentTab == 0) {
87+ root.favoriteSelected(scopeId);
88+ } else {
89+ root.allFavoriteSelected(scopeId);
90+ }
91+ }
8592 }
8693
8794 Binding {
@@ -409,13 +416,13 @@ Item {
409416 right: parent.right
410417 verticalCenter: parent.verticalCenter
411418 }
412− Image {
419+ Icon {
413420 id: storeImage
414− source: "graphics/apps-scope.png"
421+ name: "ubuntu-store-symbolic"
422+ color: "white"
415423 anchors.horizontalCenter: parent.horizontalCenter
416424 width: units.gu(2)
417425 height: units.gu(2)
418− fillMode: Image.Stretch
419426 }
420427 Label {
421428 id: storeLabel
qml/Dash/graphics/apps-scope.pngdeleted

Binary file not shown.

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

Binary file not shown.