Merge lp:~boiko/messaging-app/new_send_icon into lp:messaging-app

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 402
Merged at revision: 401
Proposed branch: lp:~boiko/messaging-app/new_send_icon
Merge into: lp:messaging-app
Diff against target: 267 lines (+186/-44)
3 files modified
src/qml/Messages.qml (+44/-43)
src/qml/assets/send.svg (+141/-0)
tests/autopilot/messaging_app/emulators.py (+1/-1)
To merge this branch: bzr merge lp:~boiko/messaging-app/new_send_icon
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+264425@code.launchpad.net

Commit message

Update the send icon per design request.

Description of the change

Update the send icon per design request.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
402. By Gustavo Pichorim Boiko

Fix autopilot test.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/Messages.qml'
2--- src/qml/Messages.qml 2015-07-07 19:08:55 +0000
3+++ src/qml/Messages.qml 2015-07-10 18:18:22 +0000
4@@ -977,19 +977,16 @@
5 }
6 }
7
8- Button {
9+ Icon {
10 id: sendButton
11 objectName: "sendButton"
12- anchors.bottomMargin: units.gu(1)
13- anchors.bottom: parent.bottom
14+ anchors.verticalCenter: textEntry.verticalCenter
15 anchors.right: parent.right
16 anchors.rightMargin: units.gu(2)
17- text: i18n.tr("Send")
18- color: enabled ? "#38b44a" : "#b2b2b2"
19- width: units.gu(7)
20- height: units.gu(4)
21- font.pixelSize: FontUtils.sizeToPixels("small")
22- activeFocusOnPress: false
23+ color: "gray"
24+ source: Qt.resolvedUrl("./assets/send.svg")
25+ width: units.gu(3)
26+ height: units.gu(3)
27 enabled: {
28 if (participants.length > 0 || multiRecipient.recipientCount > 0 || multiRecipient.searchString !== "") {
29 if (textEntry.text != "" || textEntry.inputMethodComposing || attachments.count > 0) {
30@@ -998,40 +995,44 @@
31 }
32 return false
33 }
34- onClicked: {
35- // make sure we flush everything we have prepared in the OSK preedit
36- Qt.inputMethod.commit();
37- if (textEntry.text == "" && attachments.count == 0) {
38- return
39- }
40- // refresh the recipient list
41- multiRecipient.focus = false
42- // dont change the participants list
43- if (participants.length == 0) {
44- participants = multiRecipient.recipients
45- }
46-
47- var newAttachments = []
48- for (var i = 0; i < attachments.count; i++) {
49- var attachment = []
50- var item = attachments.get(i)
51- // we dont include smil files. they will be auto generated
52- if (item.contentType.toLowerCase() === "application/smil") {
53- continue
54- }
55- attachment.push(item.name)
56- attachment.push(item.contentType)
57- attachment.push(item.filePath)
58- newAttachments.push(attachment)
59- }
60-
61- // if sendMessage succeeds it means the message was either sent or
62- // injected into the history service so the user can retry later
63- if (sendMessage(textEntry.text, participants, newAttachments)) {
64- textEntry.text = ""
65- attachments.clear()
66- }
67- updateFilters()
68+
69+ MouseArea {
70+ anchors.fill: parent
71+ onClicked: {
72+ // make sure we flush everything we have prepared in the OSK preedit
73+ Qt.inputMethod.commit();
74+ if (textEntry.text == "" && attachments.count == 0) {
75+ return
76+ }
77+ // refresh the recipient list
78+ multiRecipient.focus = false
79+ // dont change the participants list
80+ if (participants.length == 0) {
81+ participants = multiRecipient.recipients
82+ }
83+
84+ var newAttachments = []
85+ for (var i = 0; i < attachments.count; i++) {
86+ var attachment = []
87+ var item = attachments.get(i)
88+ // we dont include smil files. they will be auto generated
89+ if (item.contentType.toLowerCase() === "application/smil") {
90+ continue
91+ }
92+ attachment.push(item.name)
93+ attachment.push(item.contentType)
94+ attachment.push(item.filePath)
95+ newAttachments.push(attachment)
96+ }
97+
98+ // if sendMessage succeeds it means the message was either sent or
99+ // injected into the history service so the user can retry later
100+ if (sendMessage(textEntry.text, participants, newAttachments)) {
101+ textEntry.text = ""
102+ attachments.clear()
103+ }
104+ updateFilters()
105+ }
106 }
107 }
108 }
109
110=== added file 'src/qml/assets/send.svg'
111--- src/qml/assets/send.svg 1970-01-01 00:00:00 +0000
112+++ src/qml/assets/send.svg 2015-07-10 18:18:22 +0000
113@@ -0,0 +1,141 @@
114+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
115+<!-- Created with Inkscape (http://www.inkscape.org/) -->
116+
117+<svg
118+ xmlns:dc="http://purl.org/dc/elements/1.1/"
119+ xmlns:cc="http://creativecommons.org/ns#"
120+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
121+ xmlns:svg="http://www.w3.org/2000/svg"
122+ xmlns="http://www.w3.org/2000/svg"
123+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
124+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
125+ sodipodi:docname="send03.svg"
126+ viewBox="0 0 90 90.000001"
127+ inkscape:version="0.91pre2 r"
128+ version="1.1"
129+ id="svg4874"
130+ height="90"
131+ width="90">
132+ <defs
133+ id="defs4876" />
134+ <sodipodi:namedview
135+ id="base"
136+ pagecolor="#ffffff"
137+ bordercolor="#666666"
138+ borderopacity="1.0"
139+ inkscape:pageopacity="0.0"
140+ inkscape:pageshadow="2"
141+ inkscape:zoom="5.7646075"
142+ inkscape:cx="36.169945"
143+ inkscape:cy="29.343689"
144+ inkscape:document-units="px"
145+ inkscape:current-layer="g4228"
146+ showgrid="false"
147+ showborder="true"
148+ fit-margin-top="0"
149+ fit-margin-left="0"
150+ fit-margin-right="0"
151+ fit-margin-bottom="0"
152+ inkscape:snap-bbox="true"
153+ inkscape:bbox-paths="true"
154+ inkscape:bbox-nodes="true"
155+ inkscape:snap-bbox-edge-midpoints="true"
156+ inkscape:snap-bbox-midpoints="true"
157+ inkscape:object-paths="true"
158+ inkscape:snap-intersection-paths="true"
159+ inkscape:object-nodes="true"
160+ inkscape:snap-smooth-nodes="true"
161+ inkscape:snap-midpoints="true"
162+ inkscape:snap-object-midpoints="true"
163+ inkscape:snap-center="true"
164+ showguides="true"
165+ inkscape:guide-bbox="true"
166+ inkscape:snap-global="false">
167+ <inkscape:grid
168+ type="xygrid"
169+ id="grid5451"
170+ empspacing="6" />
171+ <sodipodi:guide
172+ orientation="1,0"
173+ position="6,77"
174+ id="guide4063" />
175+ <sodipodi:guide
176+ orientation="1,0"
177+ position="3,78"
178+ id="guide4065" />
179+ <sodipodi:guide
180+ orientation="0,1"
181+ position="55,84"
182+ id="guide4067" />
183+ <sodipodi:guide
184+ orientation="0,1"
185+ position="53,87"
186+ id="guide4069" />
187+ <sodipodi:guide
188+ orientation="0,1"
189+ position="20,3"
190+ id="guide4071" />
191+ <sodipodi:guide
192+ orientation="0,1"
193+ position="20,6"
194+ id="guide4073" />
195+ <sodipodi:guide
196+ orientation="1,0"
197+ position="87,7"
198+ id="guide4075" />
199+ <sodipodi:guide
200+ orientation="1,0"
201+ position="84,7"
202+ id="guide4077" />
203+ <sodipodi:guide
204+ orientation="0,1"
205+ position="58,81"
206+ id="guide4074" />
207+ <sodipodi:guide
208+ orientation="1,0"
209+ position="9,74"
210+ id="guide4076" />
211+ <sodipodi:guide
212+ orientation="0,1"
213+ position="21,9"
214+ id="guide4078" />
215+ <sodipodi:guide
216+ orientation="1,0"
217+ position="81,4"
218+ id="guide4080" />
219+ </sodipodi:namedview>
220+ <metadata
221+ id="metadata4879">
222+ <rdf:RDF>
223+ <cc:Work
224+ rdf:about="">
225+ <dc:format>image/svg+xml</dc:format>
226+ <dc:type
227+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
228+ <dc:title></dc:title>
229+ </cc:Work>
230+ </rdf:RDF>
231+ </metadata>
232+ <g
233+ inkscape:label="Layer 1"
234+ inkscape:groupmode="layer"
235+ id="layer1"
236+ transform="translate(67.857146,-84.50504)">
237+ <g
238+ id="g4228">
239+ <path
240+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;enable-background:accumulate"
241+ d="m 22.141874,98.953286 c -46.314226,10.949064 -89.986326,29.484374 -89.986326,29.484374 l 21.896484,9.80468 5.980469,21.61329 0.07031,-27.22071 57.591797,-30.53125 -48.572266,37.7461 -8.943359,20.18554 13.365235,-13.0625 22.53125,10.08985 c 0,0 16.771102,-28.17523 26.066406,-58.109374 z"
242+ id="path4152"
243+ inkscape:connector-curvature="0"
244+ sodipodi:nodetypes="ccccccccccc" />
245+ <rect
246+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:4;marker:none;enable-background:accumulate"
247+ id="rect2986-6"
248+ width="90"
249+ height="90"
250+ x="-67.857147"
251+ y="84.505051" />
252+ </g>
253+ </g>
254+</svg>
255
256=== modified file 'tests/autopilot/messaging_app/emulators.py'
257--- tests/autopilot/messaging_app/emulators.py 2015-06-01 20:15:03 +0000
258+++ tests/autopilot/messaging_app/emulators.py 2015-07-10 18:18:22 +0000
259@@ -125,7 +125,7 @@
260 def get_send_button(self):
261 """Return Button with text Send"""
262
263- return self.get_messages_page().select_single('Button',
264+ return self.get_messages_page().select_single('Icon11',
265 objectName='sendButton')
266
267 def get_toolbar_back_button(self):

Subscribers

People subscribed via source and target branches