Merge lp:~mzanetti/reminders-app/improve-viewer into lp:reminders-app
- improve-viewer
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Riccardo Padovani |
Approved revision: | 460 |
Merged at revision: | 459 |
Proposed branch: | lp:~mzanetti/reminders-app/improve-viewer |
Merge into: | lp:reminders-app |
Diff against target: |
601 lines (+241/-175) 8 files modified
src/app/qml/components/EditTagsDialog.qml (+1/-0) src/app/qml/components/Header.qml (+141/-0) src/app/qml/reminders.qml (+6/-18) src/app/qml/ui/EditNoteView.qml (+17/-90) src/app/qml/ui/NotePage.qml (+3/-30) src/app/qml/ui/NoteView.qml (+73/-34) src/app/qml/ui/SetReminderPage.qml (+0/-2) src/app/qml/ui/TagsPage.qml (+0/-1) |
To merge this branch: | bzr merge lp:~mzanetti/reminders-app/improve-viewer |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Riccardo Padovani | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+262162@code.launchpad.net |
Commit message
Make note viewer look like editor
Description of the change
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Riccardo Padovani (rpadovani) wrote : | # |
You forgot to edit connect signal in reminders.qml switching from opentaggednote to editnote:
(tablet mode)
file://
In phone mode I've this error: file://
I cannot close notes in tablet mode:
file://
Riccardo Padovani (rpadovani) : | # |
- 453. By Michael Zanetti
-
some cleanup
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:453
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 454. By Michael Zanetti
-
cleanup
- 455. By Michael Zanetti
-
fix tablet mode
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:454
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:455
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Riccardo Padovani (rpadovani) wrote : | # |
[Tablet mode] Choose a note, then choose another note, the note preview goes over the header.
You forgot to remove a reference to a componenent you delete: src/app/
[Tablet mode] Cannot create a reminders: qml: pushing reminderspage false
file://
[Tablet mode] If the first note in the list isn't of the default notebook and you choose it, in the preview there is the notebook selector with the default notebook selected (I think is related to a diff comment I left)
Phone mode works as expected, and it's a nice improvement :-)
- 456. By Michael Zanetti
-
always clear the sideViewLoader before embedding something new
- 457. By Michael Zanetti
-
fix initializing of the list selected notebook
- 458. By Michael Zanetti
-
fix opening or reminder settings in tablet mode.
- 459. By Michael Zanetti
-
cleanup a little
Michael Zanetti (mzanetti) wrote : | # |
> [Tablet mode] Choose a note, then choose another note, the note preview goes
> over the header.
fixed
>
> You forgot to remove a reference to a componenent you delete:
> src/app/
> defined
fixed.
>
> [Tablet mode] Cannot create a reminders: qml: pushing reminderspage false
> file://
> app/builddir/
> 'push' of null
I sort of fixed it, it sucks quite a bit visually, but let's not try to make it perfect for tablet mode just yet and wait for the upcoming multicolumn Page Stack in the SDK.
>
> [Tablet mode] If the first note in the list isn't of the default notebook and
> you choose it, in the preview there is the notebook selector with the default
> notebook selected (I think is related to a diff comment I left)
fixed
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:459
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 460. By Michael Zanetti
-
ooops
Riccardo Padovani (rpadovani) wrote : | # |
Now it's ready, thanks :-)
Just a last little fix, see inline comment
Riccardo Padovani (rpadovani) wrote : | # |
Ok, you were fastest than me, ready to go :-)
Preview Diff
1 | === modified file 'src/app/qml/components/EditTagsDialog.qml' |
2 | --- src/app/qml/components/EditTagsDialog.qml 2015-06-11 22:45:32 +0000 |
3 | +++ src/app/qml/components/EditTagsDialog.qml 2015-06-22 08:07:19 +0000 |
4 | @@ -174,6 +174,7 @@ |
5 | else { |
6 | root.note.tagGuids.push(model.guid); |
7 | } |
8 | + NotesStore.saveNote(root.note.guid); |
9 | } |
10 | } |
11 | } |
12 | |
13 | === added file 'src/app/qml/components/Header.qml' |
14 | --- src/app/qml/components/Header.qml 1970-01-01 00:00:00 +0000 |
15 | +++ src/app/qml/components/Header.qml 2015-06-22 08:07:19 +0000 |
16 | @@ -0,0 +1,141 @@ |
17 | +import QtQuick 2.2 |
18 | +import QtQuick.Layouts 1.1 |
19 | +import Ubuntu.Components 1.1 |
20 | +import Ubuntu.Components.ListItems 1.0 |
21 | +import Ubuntu.Components.Themes.Ambiance 1.1 |
22 | +import Evernote 0.1 |
23 | + |
24 | + |
25 | +Column { |
26 | + id: root |
27 | + width: parent.width |
28 | + height: childrenRect.height |
29 | + |
30 | + property var note: null |
31 | + |
32 | + property bool editingEnabled: true |
33 | + |
34 | + property alias title: titleTextField.text |
35 | + |
36 | + signal editReminders(); |
37 | + signal editTags(); |
38 | + |
39 | + Notebooks { |
40 | + id: notebooks |
41 | + } |
42 | + |
43 | + Component.onCompleted: setNotebookTimer.start(); |
44 | + onNoteChanged: setNotebookTimer.start(); |
45 | + // in case note is set during creation, the animation breaks if we set selectedIndex. Wait for a eventloop pass |
46 | + Timer { id: setNotebookTimer; interval: 1; repeat: false; onTriggered: updateNotebook(); } |
47 | + |
48 | + function updateNotebook() { |
49 | + if (!root.note) return; |
50 | + for (var i = 0; i < notebooks.count; i++) { |
51 | + if (notebooks.notebook(i).guid == root.note.notebookGuid) { |
52 | + if (notebookSelector.selectedIndex != i) { // Avoid setting it twice as it breaks the animation |
53 | + notebookSelector.selectedIndex = i; |
54 | + } |
55 | + } |
56 | + } |
57 | + } |
58 | + |
59 | + TextField { |
60 | + id: titleTextField |
61 | + height: units.gu(6) |
62 | + width: parent.width |
63 | + text: root.note ? root.note.title : "" |
64 | + placeholderText: i18n.tr("Untitled") |
65 | + font.pixelSize: units.gu(4) |
66 | + visible: root.editingEnabled |
67 | + style: TextFieldStyle { |
68 | + background: null |
69 | + } |
70 | + } |
71 | + |
72 | + Label { |
73 | + height: units.gu(6) |
74 | + anchors.left: parent.left |
75 | + anchors.right: parent.right |
76 | + anchors.margins: units.gu(1) |
77 | + text: root.note ? root.note.title : "" |
78 | + visible: !root.editingEnabled |
79 | + font.pixelSize: units.gu(4) |
80 | + verticalAlignment: Text.AlignVCenter |
81 | + } |
82 | + |
83 | + ThinDivider {} |
84 | + |
85 | + ItemSelector { |
86 | + id: notebookSelector |
87 | + width: parent.width |
88 | + model: notebooks |
89 | + |
90 | + onDelegateClicked: { |
91 | + var newNotebookGuid = model.notebook(index).guid; |
92 | + if (newNotebookGuid != root.note.notebookGuid) { |
93 | + root.note.notebookGuid = newNotebookGuid; |
94 | + NotesStore.saveNote(root.note.guid) |
95 | + } |
96 | + } |
97 | + |
98 | + delegate: OptionSelectorDelegate { |
99 | + Rectangle { |
100 | + anchors.fill: parent |
101 | + color: "white" |
102 | + |
103 | + RowLayout { |
104 | + anchors { |
105 | + fill: parent |
106 | + leftMargin: units.gu(1) |
107 | + rightMargin: units.gu(1) |
108 | + topMargin: units.gu(0.5) |
109 | + bottomMargin: units.gu(0.5) |
110 | + } |
111 | + |
112 | + Item { |
113 | + height: parent.height |
114 | + width: height |
115 | + Icon { |
116 | + anchors.fill: parent |
117 | + anchors.margins: units.gu(0.5) |
118 | + name: "notebook" |
119 | + color: preferences.colorForNotebook(model.guid) |
120 | + } |
121 | + } |
122 | + |
123 | + Label { |
124 | + text: model.name |
125 | + Layout.fillWidth: true |
126 | + color: preferences.colorForNotebook(model.guid) |
127 | + } |
128 | + RtfButton { |
129 | + iconName: root.note && root.note.reminder ? "reminder" : "reminder-new" |
130 | + height: parent.height |
131 | + width: height |
132 | + iconColor: root.note && note.reminder ? UbuntuColors.blue : Qt.rgba(0.0, 0.0, 0.0, 0.0) |
133 | + visible: index == notebookSelector.selectedIndex |
134 | + onClicked: { |
135 | + Qt.inputMethod.hide(); |
136 | + root.editReminders(); |
137 | + } |
138 | + } |
139 | + RtfButton { |
140 | + id: tagsButton |
141 | + iconSource: "../images/tags.svg" |
142 | + height: parent.height |
143 | + width: height |
144 | + visible: index == notebookSelector.selectedIndex |
145 | + onClicked: { |
146 | + Qt.inputMethod.hide(); |
147 | + root.editTags(); |
148 | + } |
149 | + } |
150 | + } |
151 | + } |
152 | + } |
153 | + } |
154 | + |
155 | + ThinDivider {} |
156 | +} |
157 | + |
158 | |
159 | === modified file 'src/app/qml/reminders.qml' |
160 | --- src/app/qml/reminders.qml 2015-06-12 09:48:22 +0000 |
161 | +++ src/app/qml/reminders.qml 2015-06-22 08:07:19 +0000 |
162 | @@ -1,4 +1,4 @@ |
163 | -/* |
164 | +/* |
165 | * Copyright: 2013 - 2014 Canonical, Ltd |
166 | * |
167 | * This file is part of reminders |
168 | @@ -125,13 +125,13 @@ |
169 | } else { |
170 | var page = pagestack.push(Qt.createComponent(Qt.resolvedUrl("ui/NotePage.qml")), {readOnly: conflictMode, note: note }) |
171 | page.editNote.connect(function(note) {root.switchToEditMode(note)}) |
172 | - page.openTaggedNotes.connect(function(title, tagGuid) {pagestack.pop();root.openTaggedNotes(title, tagGuid, true)}) |
173 | } |
174 | } else { |
175 | var view; |
176 | if (!conflictMode && note.conflicting) { |
177 | // User wants to open the note even though it is conflicting! Show the Conflict page instead. |
178 | notesPage.conflictMode = true; |
179 | + sideViewLoader.clear(); |
180 | view = sideViewLoader.embed(Qt.resolvedUrl("ui/NoteConflictView.qml")) |
181 | view.displayNote.connect(function(note) {root.displayNote(note,true)}) |
182 | view.resolveConflict.connect(function(keepLocal) { |
183 | @@ -142,8 +142,9 @@ |
184 | }) |
185 | } else { |
186 | notesPage.conflictMode = conflictMode; |
187 | + sideViewLoader.clear(); |
188 | view = sideViewLoader.embed(Qt.resolvedUrl("ui/NoteView.qml")) |
189 | - view.openTaggedNotes.connect(function(title, tagGuid) {root.openTaggedNotes(title, tagGuid, false)}) |
190 | + view.editNote.connect(function() {root.switchToEditMode(view.note)}) |
191 | } |
192 | view.note = note; |
193 | } |
194 | @@ -302,7 +303,7 @@ |
195 | } |
196 | |
197 | function openTaggedNotes(title, tagGuid, narrowMode) { |
198 | - print("opening note page for tag", tagGuid) |
199 | + print("!!!opening note page for tag", tagGuid) |
200 | var page = pagestack.push(Qt.createComponent(Qt.resolvedUrl("ui/NotesPage.qml")), {title: title, filterTagGuid: tagGuid, narrowMode: narrowMode}); |
201 | page.selectedNoteChanged.connect(function() { |
202 | if (page.selectedNote) { |
203 | @@ -555,20 +556,7 @@ |
204 | |
205 | onOpenTaggedNotes: { |
206 | var tag = NotesStore.tag(tagGuid); |
207 | - print("opening note page for tag", tagGuid) |
208 | - var page = pagestack.push(Qt.createComponent(Qt.resolvedUrl("ui/NotesPage.qml")), {title: tag.name, filterTagGuid: tagGuid, narrowMode: root.narrowMode}); |
209 | - page.selectedNoteChanged.connect(function() { |
210 | - if (page.selectedNote) { |
211 | - root.displayNote(page.selectedNote); |
212 | - if (root.narrowMode) { |
213 | - page.selectedNote = null; |
214 | - } |
215 | - } |
216 | - }) |
217 | - page.editNote.connect(function(note) { |
218 | - root.switchToEditMode(note) |
219 | - }) |
220 | - NotesStore.refreshNotes(); |
221 | + root.openTaggedNotes(tag.name, tag.guid, root.narrowMode) |
222 | } |
223 | |
224 | onOpenSearch: root.openSearch(); |
225 | |
226 | === modified file 'src/app/qml/ui/EditNoteView.qml' |
227 | --- src/app/qml/ui/EditNoteView.qml 2015-06-11 19:32:31 +0000 |
228 | +++ src/app/qml/ui/EditNoteView.qml 2015-06-22 08:07:19 +0000 |
229 | @@ -32,24 +32,18 @@ |
230 | property var note |
231 | |
232 | onNoteChanged: { |
233 | - for (var i = 0; i < notebookSelector.values.count; i++) { |
234 | - if (notebookSelector.values.notebook(i).guid == note.notebookGuid) { |
235 | - notebookSelector.selectedIndex = i; |
236 | - } |
237 | - } |
238 | note.renderWidth = noteTextArea.width - noteTextArea.textMargin * 2 |
239 | } |
240 | |
241 | signal exitEditMode(var note) |
242 | |
243 | function saveNote() { |
244 | - var title = titleTextField.text ? titleTextField.text : i18n.tr("Untitled"); |
245 | - var notebookGuid = notebookSelector.selectedGuid; |
246 | + var title = header.title ? header.title : i18n.tr("Untitled"); |
247 | + var notebookGuid = header.notebookGuid; |
248 | var text = noteTextArea.text; |
249 | |
250 | if (note) { |
251 | note.title = title; |
252 | - note.notebookGuid = notebookGuid; |
253 | note.richTextContent = text; |
254 | NotesStore.saveNote(note.guid); |
255 | } else { |
256 | @@ -120,11 +114,11 @@ |
257 | |
258 | function ensureVisible(r) |
259 | { |
260 | - var staticHeight = titleTextField.height + notebookSelector.height |
261 | + var staticHeight = header.height |
262 | if (contentX >= r.x) |
263 | contentX = r.x; |
264 | - else if (contentX +width <= r.x+r.width) |
265 | - contentX = r.x+r.width-width; |
266 | + else if (contentX + width <= r.x + r.width) |
267 | + contentX = r.x + r.width-width; |
268 | if (contentY >= r.y) |
269 | contentY = r.y; |
270 | else if (contentY + height <= r.y + staticHeight + r.height) { |
271 | @@ -137,84 +131,22 @@ |
272 | width: parent.width |
273 | height: childrenRect.height |
274 | |
275 | - TextField { |
276 | - id: titleTextField |
277 | - height: units.gu(6) |
278 | - width: parent.width |
279 | - text: root.note ? root.note.title : "" |
280 | - placeholderText: i18n.tr("Untitled") |
281 | - font.pixelSize: units.gu(4) |
282 | - style: TextFieldStyle { |
283 | - background: null |
284 | - } |
285 | - } |
286 | - |
287 | - ThinDivider {} |
288 | - |
289 | - ValueSelector { |
290 | - id: notebookSelector |
291 | - width: parent.width |
292 | - text: values.notebook(selectedIndex).name |
293 | - property string selectedGuid: values.notebook(selectedIndex) ? values.notebook(selectedIndex).guid : "" |
294 | - values: Notebooks {} |
295 | - |
296 | - // The ValueSelector is not customizable enough, yet we wanna use the expanstion it provides. Let's just paint on top of it |
297 | - |
298 | - Rectangle { |
299 | - anchors { left: parent.left; right: parent.right; top: parent.top } |
300 | - height: units.gu(6) |
301 | - color: "white" |
302 | - |
303 | - RowLayout { |
304 | - anchors.fill: parent |
305 | - anchors.margins: units.gu(1) |
306 | - |
307 | - Item { |
308 | - height: parent.height |
309 | - width: height |
310 | - Icon { |
311 | - anchors.fill: parent |
312 | - anchors.margins: units.gu(0.5) |
313 | - name: "notebook" |
314 | - color: preferences.colorForNotebook(notebookSelector.values.notebook(notebookSelector.selectedIndex).guid) |
315 | - } |
316 | - } |
317 | - |
318 | - Label { |
319 | - text: notebookSelector.values.notebook(notebookSelector.selectedIndex).name |
320 | - Layout.fillWidth: true |
321 | - color: preferences.colorForNotebook(notebookSelector.values.notebook(notebookSelector.selectedIndex).guid) |
322 | - } |
323 | - RtfButton { |
324 | - iconName: root.note && root.note.reminder ? "reminder" : "reminder-new" |
325 | - height: parent.height |
326 | - width: height |
327 | - iconColor: root.note && note.reminder ? UbuntuColors.blue : Qt.rgba(0.0, 0.0, 0.0, 0.0) |
328 | - onClicked: { |
329 | - Qt.inputMethod.hide(); |
330 | - pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), { note: root.note}); |
331 | - } |
332 | - } |
333 | - RtfButton { |
334 | - id: tagsButton |
335 | - iconSource: "../images/tags.svg" |
336 | - height: parent.height |
337 | - width: height |
338 | - onClicked: { |
339 | - Qt.inputMethod.hide(); |
340 | - PopupUtils.open(tagsDialog) |
341 | - } |
342 | - } |
343 | - } |
344 | - } |
345 | - } |
346 | - |
347 | - ThinDivider {} |
348 | + Header { |
349 | + id: header |
350 | + note: root.note |
351 | + |
352 | + onEditReminders: { |
353 | + pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), { note: root.note}); |
354 | + } |
355 | + onEditTags: { |
356 | + PopupUtils.open(Qt.resolvedUrl("../components/EditTagsDialog.qml"), root, { note: root.note, pageHeight: root.height}); |
357 | + } |
358 | + } |
359 | |
360 | TextEdit { |
361 | id: noteTextArea |
362 | width: flick.width |
363 | - height: Math.max(flick.height - notebookSelector.height - titleTextField.height, paintedHeight) |
364 | + height: Math.max(flick.height - header.height, paintedHeight) |
365 | focus: true |
366 | wrapMode: TextEdit.Wrap |
367 | textFormat: TextEdit.RichText |
368 | @@ -415,11 +347,6 @@ |
369 | } |
370 | } |
371 | |
372 | - Component { |
373 | - id: tagsDialog |
374 | - EditTagsDialog { note: root.note; pageHeight: parent.height } |
375 | - } |
376 | - |
377 | Rectangle { |
378 | anchors.fill: toolbox |
379 | color: "#efefef" |
380 | |
381 | === modified file 'src/app/qml/ui/NotePage.qml' |
382 | --- src/app/qml/ui/NotePage.qml 2015-05-27 22:45:53 +0000 |
383 | +++ src/app/qml/ui/NotePage.qml 2015-06-22 08:07:19 +0000 |
384 | @@ -28,42 +28,15 @@ |
385 | property bool readOnly: false |
386 | |
387 | signal editNote(var note) |
388 | - signal openTaggedNotes(string title, string tagGuid) |
389 | |
390 | - head { |
391 | - actions: !root.readOnly ? normalActions : [] |
392 | - property list<Action> normalActions: [ |
393 | - Action { |
394 | - text: i18n.tr("Edit") |
395 | - iconName: "edit" |
396 | - onTriggered: { |
397 | - root.editNote(root.note) |
398 | - } |
399 | - }, |
400 | - Action { |
401 | - text: note.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder") |
402 | - iconName: note.reminder ? "reminder" : "reminder-new" |
403 | - onTriggered: { |
404 | - pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), { note: root.note}); |
405 | - } |
406 | - }, |
407 | - Action { |
408 | - text: i18n.tr("Delete") |
409 | - iconName: "delete" |
410 | - onTriggered: { |
411 | - NotesStore.deleteNote(note.guid); |
412 | - pagestack.pop(); |
413 | - } |
414 | - } |
415 | - ] |
416 | - } |
417 | |
418 | NoteView { |
419 | id: noteView |
420 | anchors.fill: parent |
421 | + canClose: true |
422 | |
423 | - onOpenTaggedNotes: { |
424 | - root.openTaggedNotes(title, tagGuid); |
425 | + onEditNote: { |
426 | + root.editNote(root.note) |
427 | } |
428 | } |
429 | } |
430 | |
431 | === modified file 'src/app/qml/ui/NoteView.qml' |
432 | --- src/app/qml/ui/NoteView.qml 2015-05-27 21:04:57 +0000 |
433 | +++ src/app/qml/ui/NoteView.qml 2015-06-22 08:07:19 +0000 |
434 | @@ -17,19 +17,21 @@ |
435 | */ |
436 | |
437 | import QtQuick 2.3 |
438 | +import QtQuick.Layouts 1.1 |
439 | import Ubuntu.Components 1.1 |
440 | -import com.canonical.Oxide 1.0 |
441 | +import Ubuntu.Components.ListItems 1.0 |
442 | +import Ubuntu.Components.Popups 1.0 |
443 | +import com.canonical.Oxide 1.5 |
444 | import Ubuntu.Content 1.0 |
445 | import Evernote 0.1 |
446 | import "../components" |
447 | |
448 | Item { |
449 | id: root |
450 | - property string title: contentPeerPicker.visible ? "" |
451 | - : (note && note.title) ? note.title : i18n.tr("Untitled") |
452 | property var note: null |
453 | + property bool canClose: false |
454 | |
455 | - signal openTaggedNotes(string title, string tagGuid) |
456 | + signal editNote() |
457 | |
458 | BouncingProgressBar { |
459 | anchors.top: parent.top |
460 | @@ -48,10 +50,39 @@ |
461 | ] |
462 | } |
463 | |
464 | + Rectangle { |
465 | + id: locationBar |
466 | + y: noteTextArea.locationBarController.offset |
467 | + anchors.left: parent.left |
468 | + anchors.right: parent.right |
469 | + height: headerContent.height |
470 | + color: "white" |
471 | + z: 2 |
472 | + |
473 | + Header { |
474 | + id: headerContent |
475 | + note: root.note |
476 | + editingEnabled: false |
477 | + |
478 | + onEditReminders: { |
479 | + print("pushing reminderspage", root.note.reminder) |
480 | + pagestack.push(Qt.resolvedUrl("SetReminderPage.qml"), { note: root.note}); |
481 | + } |
482 | + onEditTags: { |
483 | + PopupUtils.open(Qt.resolvedUrl("../components/EditTagsDialog.qml"), root, { note: root.note, pageHeight: root.height }); |
484 | + } |
485 | + } |
486 | + } |
487 | + |
488 | WebView { |
489 | id: noteTextArea |
490 | - width: parent.width |
491 | - height: parent.height - tagsRow.height - (tagsRow.height > 0 ? units.gu(2) : 0) |
492 | + anchors.fill: parent |
493 | + anchors.bottomMargin: buttonPanel.height |
494 | + |
495 | + locationBarController { |
496 | + height: locationBar.height |
497 | + mode: Oxide.LocationBarController.ModeAuto |
498 | + } |
499 | |
500 | property string html: root.note ? note.htmlContent : "" |
501 | |
502 | @@ -104,38 +135,46 @@ |
503 | ] |
504 | } |
505 | |
506 | - ListView { |
507 | - id: tagsRow |
508 | - anchors { left: parent.left; right: parent.right; bottom: parent.bottom; margins: units.gu(1) } |
509 | - model: root.note ? root.note.tagGuids.length : undefined |
510 | - orientation: ListView.Horizontal |
511 | - spacing: units.gu(1) |
512 | - height: visible ? units.gu(3) : 0 |
513 | - visible: root.note ? root.note.tagGuids.length > 0 ? true : false : false |
514 | - |
515 | - delegate: Rectangle { |
516 | - id: rectangle |
517 | - radius: units.gu(1) |
518 | - color: "white" |
519 | - border.color: preferences.colorForNotebook(root.note.notebookGuid) |
520 | - |
521 | - Text { |
522 | - text: NotesStore.tag(root.note.tagGuids[index]).name |
523 | - color: preferences.colorForNotebook(root.note.notebookGuid) |
524 | - Component.onCompleted: { |
525 | - rectangle.width = width + units.gu(2) |
526 | - rectangle.height = height + units.gu(1) |
527 | - anchors.centerIn = parent |
528 | + Item { |
529 | + id: buttonPanel |
530 | + anchors { left: parent.left; right: parent.right; bottom: parent.bottom } |
531 | + height: units.gu(6) |
532 | + |
533 | + RowLayout { |
534 | + anchors { left: parent.left; right: parent.right; fill: parent } |
535 | + anchors.margins: units.gu(1) |
536 | + height: units.gu(4) |
537 | + |
538 | + RtfButton { |
539 | + iconName: "tick" |
540 | + // TRANSLATORS: Button to close the note viewer |
541 | + text: i18n.tr("Close") |
542 | + height: parent.height |
543 | + iconColor: UbuntuColors.green |
544 | + visible: root.canClose |
545 | + onClicked: { |
546 | + pageStack.pop() |
547 | } |
548 | } |
549 | |
550 | - MouseArea { |
551 | - anchors.fill: parent |
552 | + RtfSeparator { |
553 | + visible: root.canClose |
554 | + } |
555 | + |
556 | + Item { |
557 | + Layout.fillWidth: true |
558 | + } |
559 | + |
560 | + RtfSeparator {} |
561 | + |
562 | + RtfButton { |
563 | + iconName: "edit" |
564 | + // TRANSLATORS: Button to go from note viewer to note editor |
565 | + text: i18n.tr("Edit") |
566 | + height: parent.height |
567 | + iconColor: UbuntuColors.green |
568 | onClicked: { |
569 | - if (!narrowMode) { |
570 | - sideViewLoader.clear(); |
571 | - } |
572 | - root.openTaggedNotes(NotesStore.tag(root.note.tagGuids[index]).name, NotesStore.tag(root.note.tagGuids[index]).guid) |
573 | + root.editNote() |
574 | } |
575 | } |
576 | } |
577 | |
578 | === modified file 'src/app/qml/ui/SetReminderPage.qml' |
579 | --- src/app/qml/ui/SetReminderPage.qml 2014-09-23 12:39:27 +0000 |
580 | +++ src/app/qml/ui/SetReminderPage.qml 2015-06-22 08:07:19 +0000 |
581 | @@ -26,8 +26,6 @@ |
582 | title: setReminderView.title |
583 | property alias note: setReminderView.note |
584 | |
585 | - signal editNote(var note) |
586 | - |
587 | SetReminderView { |
588 | id: setReminderView |
589 | anchors.fill: parent |
590 | |
591 | === modified file 'src/app/qml/ui/TagsPage.qml' |
592 | --- src/app/qml/ui/TagsPage.qml 2015-03-15 20:00:21 +0000 |
593 | +++ src/app/qml/ui/TagsPage.qml 2015-06-22 08:07:19 +0000 |
594 | @@ -85,7 +85,6 @@ |
595 | height: units.gu(10) |
596 | |
597 | onItemClicked: { |
598 | - print("selected tag:", model.guid) |
599 | root.openTaggedNotes(model.guid) |
600 | } |
601 | onDeleteTag: { |
PASSED: Continuous integration, rev:452 91.189. 93.70:8080/ job/reminders- app-ci/ 759/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 2940 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 2940/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/reminders- app-utopic- amd64-ci/ 361 91.189. 93.70:8080/ job/reminders- app-vivid- amd64-ci/ 181
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/reminders- app-ci/ 759/rebuild
http://