Merge lp:~rpadovani/reminders-app/bottomEdge into lp:reminders-app
- bottomEdge
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Nicholas Skaggs |
Approved revision: | 198 |
Merged at revision: | 241 |
Proposed branch: | lp:~rpadovani/reminders-app/bottomEdge |
Merge into: | lp:reminders-app |
Diff against target: |
525 lines (+404/-6) 6 files modified
src/app/qml/components/PageWithBottomEdge.qml (+376/-0) src/app/qml/reminders.qml (+5/-1) src/app/qml/ui/EditNotePage.qml (+1/-0) src/app/qml/ui/EditNoteView.qml (+3/-0) src/app/qml/ui/NotebooksPage.qml (+4/-2) src/app/qml/ui/NotesPage.qml (+15/-3) |
To merge this branch: | bzr merge lp:~rpadovani/reminders-app/bottomEdge |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Michael Zanetti (community) | Approve | ||
Review via email: mp+231118@code.launchpad.net |
Commit message
Implemented bottomEdge
Description of the change
Added bottomEdge in phone mode: to avoid an annoying flickering when users open a notebook, the bottomEdge is loaded only after notes are loaded (only for notebooks page).
The bottomEdge component has been modified for our purpose
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:197
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Zanetti (mzanetti) wrote : | # |
small nitpick inline (2 comments). Works reasonably well.
Riccardo Padovani (rpadovani) wrote : | # |
Thanks, improved
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
deb: http://
SUCCESS: http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:198
http://
Executed test runs:
FAILURE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
E: Release 'utopic' for 'qtdeclarative5
E: Release 'utopic' for 'qtdeclarative5
E: Release 'utopic' for 'qtdeclarative5
E: Release 'utopic' for 'ubuntu-
E: Release 'utopic' for 'ubuntu-
Looks oddly broken?
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:198
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Francis Ginther (fginther) wrote : | # |
> E: Release 'utopic' for 'qtdeclarative5
> not found
> E: Release 'utopic' for 'qtdeclarative5
> E: Release 'utopic' for 'qtdeclarative5
> E: Release 'utopic' for 'ubuntu-
> E: Release 'utopic' for 'ubuntu-
>
> Looks oddly broken?
This appears to be fallout from the recent testing issues.
Preview Diff
1 | === added file 'src/app/qml/components/PageWithBottomEdge.qml' | |||
2 | --- src/app/qml/components/PageWithBottomEdge.qml 1970-01-01 00:00:00 +0000 | |||
3 | +++ src/app/qml/components/PageWithBottomEdge.qml 2014-09-03 16:57:24 +0000 | |||
4 | @@ -0,0 +1,376 @@ | |||
5 | 1 | /* | ||
6 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
7 | 3 | * | ||
8 | 4 | * This program is free software; you can redistribute it and/or modify | ||
9 | 5 | * it under the terms of the GNU General Public License as published by | ||
10 | 6 | * the Free Software Foundation; version 3. | ||
11 | 7 | * | ||
12 | 8 | * This program is distributed in the hope that it will be useful, | ||
13 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | 11 | * GNU General Public License for more details. | ||
16 | 12 | * | ||
17 | 13 | * You should have received a copy of the GNU General Public License | ||
18 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | 15 | */ | ||
20 | 16 | |||
21 | 17 | /* | ||
22 | 18 | Example: | ||
23 | 19 | |||
24 | 20 | MainView { | ||
25 | 21 | objectName: "mainView" | ||
26 | 22 | |||
27 | 23 | applicationName: "com.ubuntu.developer.boiko.bottomedge" | ||
28 | 24 | |||
29 | 25 | width: units.gu(100) | ||
30 | 26 | height: units.gu(75) | ||
31 | 27 | |||
32 | 28 | Component { | ||
33 | 29 | id: pageComponent | ||
34 | 30 | |||
35 | 31 | PageWithBottomEdge { | ||
36 | 32 | id: mainPage | ||
37 | 33 | title: i18n.tr("Main Page") | ||
38 | 34 | |||
39 | 35 | Rectangle { | ||
40 | 36 | anchors.fill: parent | ||
41 | 37 | color: "white" | ||
42 | 38 | } | ||
43 | 39 | |||
44 | 40 | bottomEdgePageComponent: Page { | ||
45 | 41 | title: "Contents" | ||
46 | 42 | anchors.fill: parent | ||
47 | 43 | //anchors.topMargin: contentsPage.flickable.contentY | ||
48 | 44 | |||
49 | 45 | ListView { | ||
50 | 46 | anchors.fill: parent | ||
51 | 47 | model: 50 | ||
52 | 48 | delegate: ListItems.Standard { | ||
53 | 49 | text: "One Content Item: " + index | ||
54 | 50 | } | ||
55 | 51 | } | ||
56 | 52 | } | ||
57 | 53 | bottomEdgeTitle: i18n.tr("Bottom edge action") | ||
58 | 54 | } | ||
59 | 55 | } | ||
60 | 56 | |||
61 | 57 | PageStack { | ||
62 | 58 | id: stack | ||
63 | 59 | Component.onCompleted: stack.push(pageComponent) | ||
64 | 60 | } | ||
65 | 61 | } | ||
66 | 62 | |||
67 | 63 | */ | ||
68 | 64 | |||
69 | 65 | import QtQuick 2.0 | ||
70 | 66 | import Ubuntu.Components 0.1 | ||
71 | 67 | import Evernote 0.1 | ||
72 | 68 | |||
73 | 69 | Page { | ||
74 | 70 | id: page | ||
75 | 71 | |||
76 | 72 | property alias bottomEdgePageComponent: edgeLoader.sourceComponent | ||
77 | 73 | property alias bottomEdgePageSource: edgeLoader.source | ||
78 | 74 | property alias bottomEdgeTitle: tipLabel.text | ||
79 | 75 | property alias bottomEdgeEnabled: bottomEdge.visible | ||
80 | 76 | property int bottomEdgeExpandThreshold: page.height * 0.2 | ||
81 | 77 | property int bottomEdgeExposedArea: bottomEdge.state !== "expanded" ? (page.height - bottomEdge.y - bottomEdge.tipHeight) : _areaWhenExpanded | ||
82 | 78 | property bool reloadBottomEdgePage: true | ||
83 | 79 | |||
84 | 80 | readonly property alias bottomEdgePage: edgeLoader.item | ||
85 | 81 | readonly property bool isReady: (tip.opacity === 0.0) | ||
86 | 82 | readonly property bool isCollapsed: (tip.opacity === 1.0) | ||
87 | 83 | readonly property bool bottomEdgePageLoaded: (edgeLoader.status == Loader.Ready) | ||
88 | 84 | property var temporaryProperties: null | ||
89 | 85 | |||
90 | 86 | property bool bottomEdgeLabelVisible: true | ||
91 | 87 | |||
92 | 88 | property bool _showEdgePageWhenReady: false | ||
93 | 89 | property int _areaWhenExpanded: 0 | ||
94 | 90 | |||
95 | 91 | signal bottomEdgeReleased() | ||
96 | 92 | signal bottomEdgeDismissed() | ||
97 | 93 | |||
98 | 94 | |||
99 | 95 | function showBottomEdgePage(source, properties) | ||
100 | 96 | { | ||
101 | 97 | edgeLoader.setSource(source, properties) | ||
102 | 98 | temporaryProperties = properties | ||
103 | 99 | _showEdgePageWhenReady = true | ||
104 | 100 | } | ||
105 | 101 | |||
106 | 102 | function setBottomEdgePage(source, properties) | ||
107 | 103 | { | ||
108 | 104 | edgeLoader.setSource(source, properties) | ||
109 | 105 | } | ||
110 | 106 | |||
111 | 107 | function _pushPage() | ||
112 | 108 | { | ||
113 | 109 | if (edgeLoader.status === Loader.Ready) { | ||
114 | 110 | edgeLoader.item.active = true | ||
115 | 111 | |||
116 | 112 | NotesStore.createNote("Untitled", filter); | ||
117 | 113 | |||
118 | 114 | if (edgeLoader.item.flickable) { | ||
119 | 115 | edgeLoader.item.flickable.contentY = -page.header.height | ||
120 | 116 | edgeLoader.item.flickable.returnToBounds() | ||
121 | 117 | } | ||
122 | 118 | if (edgeLoader.item.ready) | ||
123 | 119 | edgeLoader.item.ready() | ||
124 | 120 | } | ||
125 | 121 | } | ||
126 | 122 | |||
127 | 123 | |||
128 | 124 | Component.onCompleted: { | ||
129 | 125 | // avoid a binding on the expanded height value | ||
130 | 126 | var expandedHeight = height; | ||
131 | 127 | _areaWhenExpanded = expandedHeight; | ||
132 | 128 | } | ||
133 | 129 | |||
134 | 130 | onActiveChanged: { | ||
135 | 131 | if (active) { | ||
136 | 132 | bottomEdge.state = "collapsed" | ||
137 | 133 | } | ||
138 | 134 | } | ||
139 | 135 | |||
140 | 136 | onBottomEdgePageLoadedChanged: { | ||
141 | 137 | if (_showEdgePageWhenReady && bottomEdgePageLoaded) { | ||
142 | 138 | bottomEdge.state = "expanded" | ||
143 | 139 | _showEdgePageWhenReady = false | ||
144 | 140 | } | ||
145 | 141 | } | ||
146 | 142 | |||
147 | 143 | Rectangle { | ||
148 | 144 | id: bgVisual | ||
149 | 145 | |||
150 | 146 | visible: bottomEdgeLabelVisible | ||
151 | 147 | |||
152 | 148 | color: "black" | ||
153 | 149 | anchors.fill: page | ||
154 | 150 | opacity: 0.7 * ((page.height - bottomEdge.y) / page.height) | ||
155 | 151 | z: 1 | ||
156 | 152 | } | ||
157 | 153 | |||
158 | 154 | Rectangle { | ||
159 | 155 | id: bottomEdge | ||
160 | 156 | objectName: "bottomEdge" | ||
161 | 157 | |||
162 | 158 | readonly property int tipHeight: units.gu(3) | ||
163 | 159 | readonly property int pageStartY: 0 | ||
164 | 160 | |||
165 | 161 | visible: bottomEdgeLabelVisible | ||
166 | 162 | |||
167 | 163 | z: 1 | ||
168 | 164 | color: Theme.palette.normal.background | ||
169 | 165 | parent: page | ||
170 | 166 | anchors { | ||
171 | 167 | left: parent.left | ||
172 | 168 | right: parent.right | ||
173 | 169 | } | ||
174 | 170 | height: page.height | ||
175 | 171 | y: height | ||
176 | 172 | |||
177 | 173 | Rectangle { | ||
178 | 174 | id: shadow | ||
179 | 175 | |||
180 | 176 | anchors { | ||
181 | 177 | left: parent.left | ||
182 | 178 | right: parent.right | ||
183 | 179 | } | ||
184 | 180 | height: units.gu(1) | ||
185 | 181 | y: -height | ||
186 | 182 | opacity: 0.0 | ||
187 | 183 | gradient: Gradient { | ||
188 | 184 | GradientStop { position: 0.0; color: "transparent" } | ||
189 | 185 | GradientStop { position: 1.0; color: Qt.rgba(0, 0, 0, 0.2) } | ||
190 | 186 | } | ||
191 | 187 | } | ||
192 | 188 | |||
193 | 189 | Item { | ||
194 | 190 | id: tipContainer | ||
195 | 191 | objectName: "bottomEdgeTip" | ||
196 | 192 | |||
197 | 193 | width: childrenRect.width | ||
198 | 194 | height: bottomEdge.tipHeight | ||
199 | 195 | clip: true | ||
200 | 196 | y: -bottomEdge.tipHeight | ||
201 | 197 | anchors.horizontalCenter: parent.horizontalCenter | ||
202 | 198 | |||
203 | 199 | UbuntuShape { | ||
204 | 200 | id: tip | ||
205 | 201 | |||
206 | 202 | width: tipLabel.paintedWidth + units.gu(6) | ||
207 | 203 | height: bottomEdge.tipHeight + units.gu(1) | ||
208 | 204 | color: Theme.palette.normal.overlay | ||
209 | 205 | Label { | ||
210 | 206 | id: tipLabel | ||
211 | 207 | |||
212 | 208 | anchors { | ||
213 | 209 | top: parent.top | ||
214 | 210 | left: parent.left | ||
215 | 211 | right: parent.right | ||
216 | 212 | } | ||
217 | 213 | height: bottomEdge.tipHeight | ||
218 | 214 | verticalAlignment: Text.AlignVCenter | ||
219 | 215 | horizontalAlignment: Text.AlignHCenter | ||
220 | 216 | } | ||
221 | 217 | } | ||
222 | 218 | } | ||
223 | 219 | |||
224 | 220 | MouseArea { | ||
225 | 221 | preventStealing: true | ||
226 | 222 | drag.axis: Drag.YAxis | ||
227 | 223 | drag.target: bottomEdge | ||
228 | 224 | drag.minimumY: bottomEdge.pageStartY | ||
229 | 225 | drag.maximumY: page.height | ||
230 | 226 | |||
231 | 227 | anchors { | ||
232 | 228 | left: parent.left | ||
233 | 229 | right: parent.right | ||
234 | 230 | } | ||
235 | 231 | height: bottomEdge.tipHeight | ||
236 | 232 | y: -height | ||
237 | 233 | |||
238 | 234 | onReleased: { | ||
239 | 235 | page.bottomEdgeReleased() | ||
240 | 236 | if (bottomEdge.y < (page.height - bottomEdgeExpandThreshold - bottomEdge.tipHeight)) { | ||
241 | 237 | bottomEdge.state = "expanded" | ||
242 | 238 | } else { | ||
243 | 239 | bottomEdge.state = "collapsed" | ||
244 | 240 | bottomEdge.y = bottomEdge.height | ||
245 | 241 | } | ||
246 | 242 | } | ||
247 | 243 | |||
248 | 244 | onPressed: { | ||
249 | 245 | bottomEdge.state = "floating" | ||
250 | 246 | bottomEdge.y -= bottomEdge.tipHeight | ||
251 | 247 | } | ||
252 | 248 | } | ||
253 | 249 | |||
254 | 250 | Behavior on y { | ||
255 | 251 | UbuntuNumberAnimation {} | ||
256 | 252 | } | ||
257 | 253 | |||
258 | 254 | state: "collapsed" | ||
259 | 255 | states: [ | ||
260 | 256 | State { | ||
261 | 257 | name: "collapsed" | ||
262 | 258 | PropertyChanges { | ||
263 | 259 | target: bottomEdge | ||
264 | 260 | y: bottomEdge.height | ||
265 | 261 | } | ||
266 | 262 | PropertyChanges { | ||
267 | 263 | target: tip | ||
268 | 264 | opacity: 1.0 | ||
269 | 265 | } | ||
270 | 266 | }, | ||
271 | 267 | State { | ||
272 | 268 | name: "expanded" | ||
273 | 269 | PropertyChanges { | ||
274 | 270 | target: bottomEdge | ||
275 | 271 | y: bottomEdge.pageStartY | ||
276 | 272 | } | ||
277 | 273 | PropertyChanges { | ||
278 | 274 | target: tip | ||
279 | 275 | opacity: 0.0 | ||
280 | 276 | } | ||
281 | 277 | }, | ||
282 | 278 | State { | ||
283 | 279 | name: "floating" | ||
284 | 280 | PropertyChanges { | ||
285 | 281 | target: shadow | ||
286 | 282 | opacity: 1.0 | ||
287 | 283 | } | ||
288 | 284 | } | ||
289 | 285 | ] | ||
290 | 286 | |||
291 | 287 | transitions: [ | ||
292 | 288 | Transition { | ||
293 | 289 | to: "expanded" | ||
294 | 290 | SequentialAnimation { | ||
295 | 291 | UbuntuNumberAnimation { | ||
296 | 292 | targets: [bottomEdge,tip] | ||
297 | 293 | properties: "y,opacity" | ||
298 | 294 | duration: UbuntuAnimation.SlowDuration | ||
299 | 295 | } | ||
300 | 296 | ScriptAction { | ||
301 | 297 | script: page._pushPage() | ||
302 | 298 | } | ||
303 | 299 | } | ||
304 | 300 | }, | ||
305 | 301 | Transition { | ||
306 | 302 | from: "expanded" | ||
307 | 303 | to: "collapsed" | ||
308 | 304 | SequentialAnimation { | ||
309 | 305 | ScriptAction { | ||
310 | 306 | script: { | ||
311 | 307 | edgeLoader.item.parent = edgeLoader | ||
312 | 308 | edgeLoader.item.anchors.fill = edgeLoader | ||
313 | 309 | edgeLoader.item.active = false | ||
314 | 310 | } | ||
315 | 311 | } | ||
316 | 312 | UbuntuNumberAnimation { | ||
317 | 313 | targets: [bottomEdge,tip] | ||
318 | 314 | properties: "y,opacity" | ||
319 | 315 | duration: UbuntuAnimation.SlowDuration | ||
320 | 316 | } | ||
321 | 317 | ScriptAction { | ||
322 | 318 | script: { | ||
323 | 319 | // destroy current bottom page | ||
324 | 320 | if (page.reloadBottomEdgePage) { | ||
325 | 321 | edgeLoader.active = false | ||
326 | 322 | // remove properties from old instance | ||
327 | 323 | if (edgeLoader.source !== "") { | ||
328 | 324 | var properties = {} | ||
329 | 325 | if (temporaryProperties !== null) { | ||
330 | 326 | properties = temporaryProperties | ||
331 | 327 | temporaryProperties = null | ||
332 | 328 | } | ||
333 | 329 | |||
334 | 330 | edgeLoader.setSource(edgeLoader.source, properties) | ||
335 | 331 | } | ||
336 | 332 | } | ||
337 | 333 | |||
338 | 334 | // notify | ||
339 | 335 | page.bottomEdgeDismissed() | ||
340 | 336 | |||
341 | 337 | // load a new bottom page in memory | ||
342 | 338 | edgeLoader.active = true | ||
343 | 339 | } | ||
344 | 340 | } | ||
345 | 341 | } | ||
346 | 342 | }, | ||
347 | 343 | Transition { | ||
348 | 344 | from: "floating" | ||
349 | 345 | to: "collapsed" | ||
350 | 346 | UbuntuNumberAnimation { | ||
351 | 347 | targets: [bottomEdge,tip] | ||
352 | 348 | properties: "y,opacity" | ||
353 | 349 | } | ||
354 | 350 | } | ||
355 | 351 | ] | ||
356 | 352 | |||
357 | 353 | Loader { | ||
358 | 354 | id: edgeLoader | ||
359 | 355 | |||
360 | 356 | z: 1 | ||
361 | 357 | active: true | ||
362 | 358 | asynchronous: true | ||
363 | 359 | anchors.fill: parent | ||
364 | 360 | |||
365 | 361 | //WORKAROUND: The SDK move the page contents down to allocate space for the header we need to avoid that during the page dragging | ||
366 | 362 | Binding { | ||
367 | 363 | target: edgeLoader | ||
368 | 364 | property: "anchors.topMargin" | ||
369 | 365 | value: edgeLoader.item && edgeLoader.item.flickable ? edgeLoader.item.flickable.contentY : 0 | ||
370 | 366 | when: (edgeLoader.status === Loader.Ready && !page.isReady) | ||
371 | 367 | } | ||
372 | 368 | |||
373 | 369 | onLoaded: { | ||
374 | 370 | if (page.isReady && edgeLoader.item.active != true) { | ||
375 | 371 | page._pushPage() | ||
376 | 372 | } | ||
377 | 373 | } | ||
378 | 374 | } | ||
379 | 375 | } | ||
380 | 376 | } | ||
381 | 0 | 377 | ||
382 | === modified file 'src/app/qml/reminders.qml' | |||
383 | --- src/app/qml/reminders.qml 2014-08-06 09:44:18 +0000 | |||
384 | +++ src/app/qml/reminders.qml 2014-09-03 16:57:24 +0000 | |||
385 | @@ -207,6 +207,8 @@ | |||
386 | 207 | page: NotesPage { | 207 | page: NotesPage { |
387 | 208 | id: notesPage | 208 | id: notesPage |
388 | 209 | 209 | ||
389 | 210 | narrowMode: root.narrowMode | ||
390 | 211 | |||
391 | 210 | onEditNote: { | 212 | onEditNote: { |
392 | 211 | root.switchToEditMode(note) | 213 | root.switchToEditMode(note) |
393 | 212 | } | 214 | } |
394 | @@ -236,11 +238,13 @@ | |||
395 | 236 | page: NotebooksPage { | 238 | page: NotebooksPage { |
396 | 237 | id: notebooksPage | 239 | id: notebooksPage |
397 | 238 | 240 | ||
398 | 241 | narrowMode: root.narrowMode | ||
399 | 242 | |||
400 | 239 | onOpenNotebook: { | 243 | onOpenNotebook: { |
401 | 240 | var component = Qt.createComponent(Qt.resolvedUrl("ui/NotesPage.qml")) | 244 | var component = Qt.createComponent(Qt.resolvedUrl("ui/NotesPage.qml")) |
402 | 241 | var page = component.createObject(); | 245 | var page = component.createObject(); |
403 | 242 | print("opening note page for notebook", notebookGuid) | 246 | print("opening note page for notebook", notebookGuid) |
405 | 243 | pagestack.push(page, {title: title, filter: notebookGuid}); | 247 | pagestack.push(page, {title: title, filter: notebookGuid, narrowMode: narrowMode}); |
406 | 244 | page.selectedNoteChanged.connect(function() { | 248 | page.selectedNoteChanged.connect(function() { |
407 | 245 | print("foo", page.selectedNote); | 249 | print("foo", page.selectedNote); |
408 | 246 | if (page.selectedNote) { | 250 | if (page.selectedNote) { |
409 | 247 | 251 | ||
410 | === modified file 'src/app/qml/ui/EditNotePage.qml' | |||
411 | --- src/app/qml/ui/EditNotePage.qml 2014-05-07 16:34:06 +0000 | |||
412 | +++ src/app/qml/ui/EditNotePage.qml 2014-09-03 16:57:24 +0000 | |||
413 | @@ -25,6 +25,7 @@ | |||
414 | 25 | Page { | 25 | Page { |
415 | 26 | id: root | 26 | id: root |
416 | 27 | property alias note: editNoteView.note | 27 | property alias note: editNoteView.note |
417 | 28 | property alias isBottomEdge: editNoteView.isBottomEdge | ||
418 | 28 | 29 | ||
419 | 29 | signal exitEditMode(var note) | 30 | signal exitEditMode(var note) |
420 | 30 | 31 | ||
421 | 31 | 32 | ||
422 | === modified file 'src/app/qml/ui/EditNoteView.qml' | |||
423 | --- src/app/qml/ui/EditNoteView.qml 2014-07-14 13:40:24 +0000 | |||
424 | +++ src/app/qml/ui/EditNoteView.qml 2014-09-03 16:57:24 +0000 | |||
425 | @@ -26,6 +26,7 @@ | |||
426 | 26 | Item { | 26 | Item { |
427 | 27 | id: root | 27 | id: root |
428 | 28 | property var note | 28 | property var note |
429 | 29 | property bool isBottomEdge: false | ||
430 | 29 | 30 | ||
431 | 30 | onNoteChanged: { | 31 | onNoteChanged: { |
432 | 31 | for (var i = 0; i < notebookSelector.model.count; i++) { | 32 | for (var i = 0; i < notebookSelector.model.count; i++) { |
433 | @@ -74,6 +75,7 @@ | |||
434 | 74 | spacing: units.gu(1) | 75 | spacing: units.gu(1) |
435 | 75 | 76 | ||
436 | 76 | Row { | 77 | Row { |
437 | 78 | visible: !root.isBottomEdge | ||
438 | 77 | anchors { left: parent.left; right: parent.right } | 79 | anchors { left: parent.left; right: parent.right } |
439 | 78 | height: units.gu(5) | 80 | height: units.gu(5) |
440 | 79 | spacing: units.gu(2) | 81 | spacing: units.gu(2) |
441 | @@ -126,6 +128,7 @@ | |||
442 | 126 | } | 128 | } |
443 | 127 | 129 | ||
444 | 128 | Divider { | 130 | Divider { |
445 | 131 | visible: !root.isBottomEdge | ||
446 | 129 | anchors { leftMargin: -units.gu(2); rightMargin: -units.gu(2) } | 132 | anchors { leftMargin: -units.gu(2); rightMargin: -units.gu(2) } |
447 | 130 | height: units.gu(2) | 133 | height: units.gu(2) |
448 | 131 | } | 134 | } |
449 | 132 | 135 | ||
450 | === modified file 'src/app/qml/ui/NotebooksPage.qml' | |||
451 | --- src/app/qml/ui/NotebooksPage.qml 2014-06-24 00:01:51 +0000 | |||
452 | +++ src/app/qml/ui/NotebooksPage.qml 2014-09-03 16:57:24 +0000 | |||
453 | @@ -26,7 +26,9 @@ | |||
454 | 26 | id: root | 26 | id: root |
455 | 27 | objectName: 'notebooksPage' | 27 | objectName: 'notebooksPage' |
456 | 28 | 28 | ||
458 | 29 | signal openNotebook(string title, string notebookGuid) | 29 | property bool narrowMode |
459 | 30 | |||
460 | 31 | signal openNotebook(string title, string notebookGuid, bool narrowMode) | ||
461 | 30 | 32 | ||
462 | 31 | onActiveChanged: { | 33 | onActiveChanged: { |
463 | 32 | if (active) { | 34 | if (active) { |
464 | @@ -135,7 +137,7 @@ | |||
465 | 135 | delegate: NotebooksDelegate { | 137 | delegate: NotebooksDelegate { |
466 | 136 | onClicked: { | 138 | onClicked: { |
467 | 137 | print("selected notebook:", model.guid) | 139 | print("selected notebook:", model.guid) |
469 | 138 | root.openNotebook(name, model.guid) | 140 | root.openNotebook(name, model.guid, narrowMode) |
470 | 139 | } | 141 | } |
471 | 140 | } | 142 | } |
472 | 141 | 143 | ||
473 | 142 | 144 | ||
474 | === modified file 'src/app/qml/ui/NotesPage.qml' | |||
475 | --- src/app/qml/ui/NotesPage.qml 2014-08-14 17:17:05 +0000 | |||
476 | +++ src/app/qml/ui/NotesPage.qml 2014-09-03 16:57:24 +0000 | |||
477 | @@ -23,13 +23,24 @@ | |||
478 | 23 | import Evernote 0.1 | 23 | import Evernote 0.1 |
479 | 24 | import "../components" | 24 | import "../components" |
480 | 25 | 25 | ||
482 | 26 | Page { | 26 | PageWithBottomEdge { |
483 | 27 | id: root | 27 | id: root |
484 | 28 | 28 | ||
485 | 29 | property var selectedNote: null | 29 | property var selectedNote: null |
486 | 30 | property bool narrowMode | ||
487 | 30 | 31 | ||
488 | 31 | property alias filter: notes.filterNotebookGuid | 32 | property alias filter: notes.filterNotebookGuid |
489 | 32 | 33 | ||
490 | 34 | // We enable bottomEdge only in narrowMode. | ||
491 | 35 | // To avoid flashing when a notebook is loaded, we wait to have all notes | ||
492 | 36 | // loaded, but only in notebook view (when a filter is set), not in notes | ||
493 | 37 | // page, because there isn't he flashing. | ||
494 | 38 | bottomEdgeLabelVisible: narrowMode && (!notes.filterNotebookGuid || !notes.loading) | ||
495 | 39 | bottomEdgeTitle: i18n.tr("Add note") | ||
496 | 40 | bottomEdgePageComponent: EditNotePage { | ||
497 | 41 | isBottomEdge: true; | ||
498 | 42 | } | ||
499 | 43 | |||
500 | 33 | signal openSearch() | 44 | signal openSearch() |
501 | 34 | signal editNote(var note) | 45 | signal editNote(var note) |
502 | 35 | 46 | ||
503 | @@ -42,11 +53,12 @@ | |||
504 | 42 | tools: ToolbarItems { | 53 | tools: ToolbarItems { |
505 | 43 | ToolbarButton { | 54 | ToolbarButton { |
506 | 44 | action: Action { | 55 | action: Action { |
507 | 56 | visible: !narrowMode | ||
508 | 45 | text: i18n.tr("Add note") | 57 | text: i18n.tr("Add note") |
509 | 46 | iconName: "add" | 58 | iconName: "add" |
510 | 47 | onTriggered: { | 59 | onTriggered: { |
511 | 48 | NotesStore.createNote(i18n.tr("Untitled"), filter); | 60 | NotesStore.createNote(i18n.tr("Untitled"), filter); |
513 | 49 | } | 61 | } |
514 | 50 | } | 62 | } |
515 | 51 | } | 63 | } |
516 | 52 | 64 | ||
517 | @@ -118,7 +130,7 @@ | |||
518 | 118 | } | 130 | } |
519 | 119 | } | 131 | } |
520 | 120 | } | 132 | } |
522 | 121 | } | 133 | } |
523 | 122 | 134 | ||
524 | 123 | Notes { | 135 | Notes { |
525 | 124 | id: notes | 136 | id: notes |
FAILED: Continuous integration, rev:196 91.189. 93.70:8080/ job/reminders- app-ci/ 481/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 1578/console 91.189. 93.70:8080/ job/reminders- app-utopic- amd64-ci/ 177/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/reminders- app-ci/ 481/rebuild
http://