Merge lp:~verzegnassi-stefano/quick-memo/ucs-empty-state into lp:quick-memo

Proposed by Stefano Verzegnassi on 2015-03-27
Status: Merged
Approved by: Stefano Verzegnassi on 2015-04-13
Approved revision: 62
Merged at revision: 62
Proposed branch: lp:~verzegnassi-stefano/quick-memo/ucs-empty-state
Merge into: lp:quick-memo
Diff against target: 219 lines (+71/-44)
4 files modified
app/components/MainPage.qml (+7/-28)
app/ubuntucomponents/EmptyState.qml (+43/-0)
app/ubuntucomponents/README.components (+5/-0)
po/quick-memo.pot (+16/-16)
To merge this branch: bzr merge lp:~verzegnassi-stefano/quick-memo/ucs-empty-state
Reviewer Review Type Date Requested Status
Stefano Verzegnassi Pending
Review via email: mp+254417@code.launchpad.net

Commit message

Use Empty State component from the Ubuntu Touch Component Store project

Description of the change

Use Empty State component from the Ubuntu Touch Component Store project

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/MainPage.qml'
2--- app/components/MainPage.qml 2014-11-03 00:21:23 +0000
3+++ app/components/MainPage.qml 2015-03-27 15:49:58 +0000
4@@ -20,6 +20,8 @@
5 import Ubuntu.Components.ListItems 1.0 as ListItem
6 import Ubuntu.Components.Popups 1.0
7
8+import "../ubuntucomponents"
9+
10 PageWithBottomEdge {
11 id: mainPage
12 title: i18n.tr("Overview")
13@@ -44,35 +46,12 @@
14 Item {
15 anchors.fill: parent
16
17- Column {
18+ EmptyState {
19 anchors.centerIn: parent
20- width: parent.width * 0.3
21- spacing: units.gu(1)
22-
23- Icon {
24- width: parent.width
25- height: width
26-
27- name: "note"
28- }
29-
30- Column {
31- width: parent.width
32-
33- Label {
34- anchors.horizontalCenter: parent.horizontalCenter
35- fontSize: "x-large"
36- font.weight: Font.DemiBold
37-
38- text: i18n.tr("No stored memos")
39- }
40-
41- Label {
42- anchors.horizontalCenter: parent.horizontalCenter
43-
44- text: i18n.tr("Swipe the bottom edge to add a new memo.")
45- }
46- }
47+
48+ iconName: "note"
49+ title: i18n.tr("No stored memos")
50+ subTitle: i18n.tr("Swipe the bottom edge to add a new memo.")
51 }
52 }
53 }
54
55=== added file 'app/ubuntucomponents/EmptyState.qml'
56--- app/ubuntucomponents/EmptyState.qml 1970-01-01 00:00:00 +0000
57+++ app/ubuntucomponents/EmptyState.qml 2015-03-27 15:49:58 +0000
58@@ -0,0 +1,43 @@
59+import QtQuick 2.0
60+import Ubuntu.Components 1.1
61+
62+/*
63+ Component which displays an empty state (approved by design). It offers an
64+ icon, title and subtitle to describe the empty state.
65+*/
66+
67+Item {
68+ id: emptyState
69+
70+ // Public APIs
71+ property alias iconName: emptyIcon.name
72+ property alias iconSource: emptyIcon.source
73+ property alias iconColor: emptyIcon.color
74+ property alias title: emptyLabel.text
75+ property alias subTitle: emptySublabel.text
76+
77+ height: childrenRect.height
78+
79+ Icon {
80+ id: emptyIcon
81+ anchors.horizontalCenter: parent.horizontalCenter
82+ height: units.gu(10)
83+ width: height
84+ color: "#BBBBBB"
85+ }
86+
87+ Label {
88+ id: emptyLabel
89+ anchors.top: emptyIcon.bottom
90+ anchors.topMargin: units.gu(5)
91+ anchors.horizontalCenter: parent.horizontalCenter
92+ fontSize: "large"
93+ font.bold: true
94+ }
95+
96+ Label {
97+ id: emptySublabel
98+ anchors.top: emptyLabel.bottom
99+ anchors.horizontalCenter: parent.horizontalCenter
100+ }
101+}
102
103=== modified file 'app/ubuntucomponents/README.components'
104--- app/ubuntucomponents/README.components 2014-10-04 00:24:12 +0000
105+++ app/ubuntucomponents/README.components 2015-03-27 15:49:58 +0000
106@@ -7,6 +7,11 @@
107
108 ### Links
109
110+EmptyState.qml (revision 21)
111+ * No changes
112+
113+http://bazaar.launchpad.net/~ubuntu-touch-community-dev/component-store/trunk.14.10/view/head:/ComponentStore/EmptyState/EmptyState.qml
114+
115 TextField.qml (revision 1273)
116 * Added wrapMode property, which is currently not exposed from QML TextInput (lp:1376510)
117 * Added editingFinished signal (lp:1376510)
118
119=== modified file 'po/quick-memo.pot'
120--- po/quick-memo.pot 2015-01-19 16:15:30 +0000
121+++ po/quick-memo.pot 2015-03-27 15:49:58 +0000
122@@ -8,7 +8,7 @@
123 msgstr ""
124 "Project-Id-Version: \n"
125 "Report-Msgid-Bugs-To: \n"
126-"POT-Creation-Date: 2015-01-19 17:14+0100\n"
127+"POT-Creation-Date: 2015-03-25 09:45+0100\n"
128 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
129 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
130 "Language-Team: LANGUAGE <LL@li.org>\n"
131@@ -63,7 +63,7 @@
132
133 #: ../app/components/ColorDialog.qml:151
134 #: ../app/components/EditMemoPage.qml:270
135-#: ../app/components/EditMemoPage.qml:298 ../app/components/MainPage.qml:283
136+#: ../app/components/EditMemoPage.qml:298 ../app/components/MainPage.qml:262
137 #: ../app/components/MultiSelectionHandler.qml:33
138 msgid "Cancel"
139 msgstr ""
140@@ -104,18 +104,18 @@
141 msgstr ""
142
143 #: ../app/components/EditMemoPage.qml:206
144-#: ../app/components/EditMemoPage.qml:266 ../app/components/MainPage.qml:240
145-#: ../app/components/MainPage.qml:279
146+#: ../app/components/EditMemoPage.qml:266 ../app/components/MainPage.qml:219
147+#: ../app/components/MainPage.qml:258
148 msgid "Delete memo"
149 msgid_plural "Delete memos"
150 msgstr[0] ""
151 msgstr[1] ""
152
153-#: ../app/components/EditMemoPage.qml:213 ../app/components/MainPage.qml:233
154+#: ../app/components/EditMemoPage.qml:213 ../app/components/MainPage.qml:212
155 msgid "Change memo color"
156 msgstr ""
157
158-#: ../app/components/EditMemoPage.qml:240 ../app/components/MainPage.qml:268
159+#: ../app/components/EditMemoPage.qml:240 ../app/components/MainPage.qml:247
160 msgid "Memo updated!"
161 msgid_plural "Memos updated!"
162 msgstr[0] ""
163@@ -133,15 +133,15 @@
164 msgid "This memo has no content."
165 msgstr ""
166
167-#: ../app/components/EditMemoPage.qml:267 ../app/components/MainPage.qml:280
168+#: ../app/components/EditMemoPage.qml:267 ../app/components/MainPage.qml:259
169 msgid "Are you sure?"
170 msgstr ""
171
172-#: ../app/components/EditMemoPage.qml:276 ../app/components/MainPage.qml:288
173+#: ../app/components/EditMemoPage.qml:276 ../app/components/MainPage.qml:267
174 msgid "Delete"
175 msgstr ""
176
177-#: ../app/components/EditMemoPage.qml:284 ../app/components/MainPage.qml:295
178+#: ../app/components/EditMemoPage.qml:284 ../app/components/MainPage.qml:274
179 msgid "Memo deleted!"
180 msgid_plural "Memos deleted!"
181 msgstr[0] ""
182@@ -176,31 +176,31 @@
183 msgid "Add"
184 msgstr ""
185
186-#: ../app/components/MainPage.qml:25
187+#: ../app/components/MainPage.qml:27
188 msgid "Overview"
189 msgstr ""
190
191-#: ../app/components/MainPage.qml:67
192+#: ../app/components/MainPage.qml:53
193 msgid "No stored memos"
194 msgstr ""
195
196-#: ../app/components/MainPage.qml:73
197+#: ../app/components/MainPage.qml:54
198 msgid "Swipe the bottom edge to add a new memo."
199 msgstr ""
200
201-#: ../app/components/MainPage.qml:218
202+#: ../app/components/MainPage.qml:197
203 msgid "About..."
204 msgstr ""
205
206-#: ../app/components/MainPage.qml:225
207+#: ../app/components/MainPage.qml:204
208 msgid "Switch to one-column list"
209 msgstr ""
210
211-#: ../app/components/MainPage.qml:225
212+#: ../app/components/MainPage.qml:204
213 msgid "Switch to grid"
214 msgstr ""
215
216-#: ../app/components/MainPage.qml:301
217+#: ../app/components/MainPage.qml:280
218 msgid "New memo"
219 msgstr ""
220

Subscribers

People subscribed via source and target branches

to all changes: