Merge lp:~rpadovani/reminders-app/rtfmplaceholders into lp:reminders-app

Proposed by Riccardo Padovani
Status: Rejected
Rejected by: Michael Zanetti
Proposed branch: lp:~rpadovani/reminders-app/rtfmplaceholders
Merge into: lp:reminders-app
Diff against target: 152 lines (+102/-8)
1 file modified
src/app/qml/ui/EditNotePage.qml (+102/-8)
To merge this branch: bzr merge lp:~rpadovani/reminders-app/rtfmplaceholders
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Notes app developers Pending
Review via email: mp+204393@code.launchpad.net

Commit message

Added RTF mode panel, with icons for bold, italic, underlined text and font change.
They are only placeholders

Description of the change

Added RTF mode panel, with icons for bold, italic, underlined text and font change.
They are only placeholders

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Sorry... I kinda went wild and implemented this a bit differently.

Unmerged revisions

49. By Riccardo Padovani

Modified icons

48. By Riccardo Padovani

Added placeholders for RTF mode

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/qml/ui/EditNotePage.qml'
2--- src/app/qml/ui/EditNotePage.qml 2014-01-30 11:34:23 +0000
3+++ src/app/qml/ui/EditNotePage.qml 2014-02-02 10:41:23 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright: 2013 Canonical, Ltd
7+ * Copyright: 2013, 2014 Canonical, Ltd
8 *
9 * This file is part of reminders
10 *
11@@ -26,6 +26,7 @@
12 Page {
13 id: root
14 property var note
15+ property bool isRTFMode: false
16
17 tools: ToolbarItems {
18 locked: true
19@@ -33,6 +34,13 @@
20 }
21
22 QtObject {
23+ id: modifier
24+ property bool isBoldMode: false
25+ property bool isItalicMode: false
26+ property bool isUnderlinedMode: false
27+ }
28+
29+ QtObject {
30 id: priv
31 property int insertPosition
32 property var activeTransfer
33@@ -147,6 +155,7 @@
34 name: "import-image"
35 height: units.gu(3)
36 width: height
37+ visible: !isRTFMode
38 anchors.verticalCenter: parent.verticalCenter
39 anchors.left: parent.left
40 anchors.margins: units.gu(2)
41@@ -167,6 +176,7 @@
42 name: "camera-symbolic"
43 height: units.gu(3)
44 width: height
45+ visible: !isRTFMode
46 anchors.centerIn: parent
47 MouseArea {
48 anchors.fill: parent
49@@ -179,13 +189,97 @@
50 name: "edit"
51 height: units.gu(3)
52 width: height
53- anchors.verticalCenter: parent.verticalCenter
54- anchors.right: parent.right
55- anchors.margins: units.gu(2)
56- MouseArea {
57- anchors.fill: parent
58- onClicked: {
59- }
60+ visible: !isRTFMode
61+ anchors.verticalCenter: parent.verticalCenter
62+ anchors.right: parent.right
63+ anchors.margins: units.gu(2)
64+ MouseArea {
65+ anchors.fill: parent
66+ onClicked: {
67+ isRTFMode = true;
68+ console.log("These are only placeholders, RTF mode is not implemented yet");
69+ }
70+ }
71+ }
72+
73+ Icon {
74+ id: fontIcon
75+ name: "preferences-desktop-font"
76+ height: units.gu(3)
77+ width: height
78+ visible: isRTFMode
79+ anchors.verticalCenter: parent.verticalCenter
80+ anchors.left: parent.left
81+ anchors.margins: units.gu(2)
82+ MouseArea {
83+ anchors.fill: parent
84+ onClicked: {
85+ }
86+ }
87+ }
88+
89+ Icon {
90+ id: boldIcon
91+ name: "format-text-bold"
92+ height: units.gu(3)
93+ width: height
94+ visible: isRTFMode
95+ anchors.verticalCenter: parent.verticalCenter
96+ anchors.left: fontIcon.right
97+ anchors.margins: units.gu(2)
98+ MouseArea {
99+ anchors.fill: parent
100+ onClicked: {
101+ modifier.isBoldMode = !modifier.isBoldMode
102+ }
103+ }
104+ }
105+
106+ Icon {
107+ id: italicIcon
108+ name: "format-text-italic"
109+ height: units.gu(3)
110+ width: height
111+ visible: isRTFMode
112+ anchors.verticalCenter: parent.verticalCenter
113+ anchors.left: boldIcon.right
114+ anchors.margins: units.gu(2)
115+ MouseArea {
116+ anchors.fill: parent
117+ onClicked: {
118+ modifier.isItalicMode = !modifier.isItalicMode
119+ }
120+ }
121+ }
122+
123+ Icon {
124+ id: underlineIcon
125+ name: "format-text-underline"
126+ height: units.gu(3)
127+ width: height
128+ visible: isRTFMode
129+ anchors.verticalCenter: parent.verticalCenter
130+ anchors.left: italicIcon.right
131+ anchors.margins: units.gu(2)
132+ MouseArea {
133+ anchors.fill: parent
134+ onClicked: {
135+ modifier.isUnderlinedMode = !modifier.isUnderlinedMode
136+ }
137+ }
138+ }
139+
140+ Icon {
141+ name: "back"
142+ height: units.gu(3)
143+ width: height
144+ anchors.verticalCenter: parent.verticalCenter
145+ anchors.margins: units.gu(2)
146+ anchors.right: parent.right
147+ visible: isRTFMode
148+ MouseArea {
149+ anchors.fill: parent
150+ onClicked: isRTFMode = false
151 }
152 }
153

Subscribers

People subscribed via source and target branches