Merge lp:~azzar1/unity/dash-fonts into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 2105
Proposed branch: lp:~azzar1/unity/dash-fonts
Merge into: lp:unity
Prerequisite: lp:~azzar1/unity/fix-748101
Diff against target: 1066 lines (+569/-89)
15 files modified
plugins/unityshell/resources/search_circle.svg (+146/-0)
plugins/unityshell/resources/search_close.svg (+134/-0)
plugins/unityshell/resources/search_spin.svg (+174/-0)
plugins/unityshell/src/DashStyle.cpp (+17/-8)
plugins/unityshell/src/DashStyle.h (+1/-0)
plugins/unityshell/src/FilterExpanderLabel.cpp (+8/-8)
plugins/unityshell/src/FilterExpanderLabel.h (+2/-2)
plugins/unityshell/src/FilterMultiRangeButton.cpp (+1/-3)
plugins/unityshell/src/PlacesGroup.cpp (+15/-13)
plugins/unityshell/src/PlacesGroup.h (+1/-0)
plugins/unityshell/src/ResultRendererTile.cpp (+4/-1)
plugins/unityshell/src/SearchBar.cpp (+48/-31)
plugins/unityshell/src/SearchBarSpinner.cpp (+8/-18)
plugins/unityshell/src/SearchBarSpinner.h (+1/-2)
plugins/unityshell/src/StaticCairoText.cpp (+9/-3)
To merge this branch: bzr merge lp:~azzar1/unity/dash-fonts
Reviewer Review Type Date Requested Status
John Lea (community) design Approve
Andrea Cimitan (community) design Approve
Mirco Müller (community) Approve
Review via email: mp+95989@code.launchpad.net

Description of the change

The problems
-------------
Bug #927710: No text inside multirange filters
Bug #942508: Dash - Font metrics and colors are wrong

The fix
-------
Update the dash fonts.

Test
----
Not applicable.

http://ubuntuone.com/1a4mdRPJ8tgFrg4bMuNiQE

I've merged lp:~sladen/unity/unity-drunken-spinner-lp943656.

To post a comment you must log in.
Revision history for this message
John Lea (johnlea) wrote :

Where can I see (the testing computer?)

On 05/03/12 20:12, Andrea Azzarone wrote:
> You have been requested to review the proposed merge of lp:~andyrock/unity/dash-fonts into lp:unity.
>
> For more details, see:
> https://code.launchpad.net/~andyrock/unity/dash-fonts/+merge/95989
>
> The problems
> -------------
> Bug #927710: No text inside multirange filters
> Bug #942508: Dash - Font metrics and colors are wrong
>
> The fix
> -------
> Update the dash fonts.
>
> Test
> ----
> Not applicable.
>
>

--
John Lea | Ubuntu Desktop User Experience Lead
Canonical www.canonical.com | Ubuntu www.ubuntu.com
27th Floor, 21-24 Millbank Tower, London, SW1P 4QP
Tel: +44 (0) 20 7630 2415 | Email: <email address hidden>

Revision history for this message
Mirco Müller (macslow) wrote :

> Where can I see (the testing computer?)

http://people.canonical.com/~mmueller/after-927710.png

Revision history for this message
Mirco Müller (macslow) wrote :

Looking good sofar. But we need to expose those colors and font-attributes in DashStyle in the long run. Otherwise we'll never get this tweaking off our shoulders.

review: Approve
Revision history for this message
Andrea Cimitan (cimi) wrote :

Looking at mirco's screenshot, the text in the search box is not aligned with the category headers.

Revision history for this message
John Lea (johnlea) wrote :

Well spotted, let's solve this last issue before landing this fix.

Revision history for this message
Andrea Azzarone (azzar1) wrote :

> Looking at mirco's screenshot, the text in the search box is not aligned with
> the category headers.

I need new assets for the search bar icons (64x64 is too big!). I've tried to resize them by myself but I had some problems.

> Looking good sofar. But we need to expose those colors and font-attributes in DashStyle in the long run. Otherwise
> we'll never get this tweaking off our shoulders.

Indeed.

Revision history for this message
Andrea Azzarone (azzar1) wrote :

> Well spotted, let's solve this last issue before landing this fix.

Fixed.

Revision history for this message
Andrea Cimitan (cimi) wrote :

With the latest fix, from the screenshot the visuals are ok

review: Approve (design)
Revision history for this message
Unity Merger (unity-merger) wrote :

No proposals found for merge of lp:~andyrock/unity/fix-748101 into lp:unity.

Revision history for this message
Mirco Müller (macslow) wrote :

Updated screenshot after Andy's latest fix-update: http://people.canonical.com/~mmueller/after-927710-2.png

Revision history for this message
Mirco Müller (macslow) wrote :

Can we sign this off as approved now John?

Revision history for this message
Andrea Azzarone (azzar1) wrote :

> Updated screenshot after Andy's latest fix-update:
> http://people.canonical.com/~mmueller/after-927710-2.png

Can you build this branch from scratch? This screenshot still has the alignment issue.
On my system: http://ubuntuone.com/1a4mdRPJ8tgFrg4bMuNiQE

Revision history for this message
Andrea Cimitan (cimi) wrote :

Which is the real screenshot? I only approve the one from andrea.

Revision history for this message
John Lea (johnlea) :
review: Approve (design)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'plugins/unityshell/resources/search_circle.svg'
2--- plugins/unityshell/resources/search_circle.svg 1970-01-01 00:00:00 +0000
3+++ plugins/unityshell/resources/search_circle.svg 2012-03-13 16:31:20 +0000
4@@ -0,0 +1,146 @@
5+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
6+<!-- Created with Inkscape (http://www.inkscape.org/) -->
7+
8+<svg
9+ xmlns:dc="http://purl.org/dc/elements/1.1/"
10+ xmlns:cc="http://creativecommons.org/ns#"
11+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
12+ xmlns:svg="http://www.w3.org/2000/svg"
13+ xmlns="http://www.w3.org/2000/svg"
14+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
15+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
16+ width="32"
17+ height="32"
18+ id="svg2"
19+ version="1.1"
20+ inkscape:version="0.47 r22583"
21+ sodipodi:docname="close.svg">
22+ <defs
23+ id="defs4">
24+ <inkscape:perspective
25+ sodipodi:type="inkscape:persp3d"
26+ inkscape:vp_x="0 : 526.18109 : 1"
27+ inkscape:vp_y="0 : 1000 : 0"
28+ inkscape:vp_z="744.09448 : 526.18109 : 1"
29+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
30+ id="perspective10" />
31+ <inkscape:perspective
32+ id="perspective2841"
33+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
34+ inkscape:vp_z="1 : 0.5 : 1"
35+ inkscape:vp_y="0 : 1000 : 0"
36+ inkscape:vp_x="0 : 0.5 : 1"
37+ sodipodi:type="inkscape:persp3d" />
38+ <inkscape:perspective
39+ id="perspective2858"
40+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
41+ inkscape:vp_z="1 : 0.5 : 1"
42+ inkscape:vp_y="0 : 1000 : 0"
43+ inkscape:vp_x="0 : 0.5 : 1"
44+ sodipodi:type="inkscape:persp3d" />
45+ <inkscape:perspective
46+ id="perspective2872"
47+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
48+ inkscape:vp_z="1 : 0.5 : 1"
49+ inkscape:vp_y="0 : 1000 : 0"
50+ inkscape:vp_x="0 : 0.5 : 1"
51+ sodipodi:type="inkscape:persp3d" />
52+ <inkscape:perspective
53+ id="perspective2968"
54+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
55+ inkscape:vp_z="1 : 0.5 : 1"
56+ inkscape:vp_y="0 : 1000 : 0"
57+ inkscape:vp_x="0 : 0.5 : 1"
58+ sodipodi:type="inkscape:persp3d" />
59+ <inkscape:perspective
60+ id="perspective2996"
61+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
62+ inkscape:vp_z="1 : 0.5 : 1"
63+ inkscape:vp_y="0 : 1000 : 0"
64+ inkscape:vp_x="0 : 0.5 : 1"
65+ sodipodi:type="inkscape:persp3d" />
66+ <inkscape:perspective
67+ id="perspective3840"
68+ inkscape:persp3d-origin="512 : 256 : 1"
69+ inkscape:vp_z="1024 : 384 : 1"
70+ inkscape:vp_y="0 : 1000 : 0"
71+ inkscape:vp_x="0 : 384 : 1"
72+ sodipodi:type="inkscape:persp3d" />
73+ <inkscape:perspective
74+ id="perspective3947"
75+ inkscape:persp3d-origin="512 : 256 : 1"
76+ inkscape:vp_z="1024 : 384 : 1"
77+ inkscape:vp_y="0 : 1000 : 0"
78+ inkscape:vp_x="0 : 384 : 1"
79+ sodipodi:type="inkscape:persp3d" />
80+ </defs>
81+ <sodipodi:namedview
82+ id="base"
83+ pagecolor="#ffffff"
84+ bordercolor="#666666"
85+ borderopacity="1.0"
86+ inkscape:pageopacity="0"
87+ inkscape:pageshadow="2"
88+ inkscape:zoom="30.5625"
89+ inkscape:cx="16"
90+ inkscape:cy="16"
91+ inkscape:document-units="px"
92+ inkscape:current-layer="g3950"
93+ showgrid="false"
94+ inkscape:window-width="1451"
95+ inkscape:window-height="975"
96+ inkscape:window-x="529"
97+ inkscape:window-y="51"
98+ inkscape:window-maximized="0" />
99+ <metadata
100+ id="metadata7">
101+ <rdf:RDF>
102+ <cc:Work
103+ rdf:about="">
104+ <dc:format>image/svg+xml</dc:format>
105+ <dc:type
106+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
107+ <dc:title></dc:title>
108+ </cc:Work>
109+ </rdf:RDF>
110+ </metadata>
111+ <g
112+ inkscape:label="Layer 1"
113+ inkscape:groupmode="layer"
114+ id="layer1"
115+ transform="translate(0,-1020.3622)">
116+ <g
117+ id="g3950"
118+ transform="translate(-735.82017,643.9392)"
119+ style="fill:#2b0000">
120+ <g
121+ id="g3928"
122+ style="fill:#ffffff">
123+ <path
124+ id="path3932"
125+ d="m 744.82017,392.423 c 0,-3.866 3.134,-7 7,-7 3.866,0 7,3.134 7,7 h 2 c 0,-4.971 -4.029,-9 -9,-9 -4.971,0 -9,4.029 -9,9 0,4.971 4.029,9 9,9 v -2 c -3.866,0 -7,-3.134 -7,-7 z"
126+ style="fill:#ffffff" />
127+ <linearGradient
128+ y2="391.6506"
129+ x2="753.69513"
130+ y1="402.29791"
131+ x1="747.54791"
132+ gradientUnits="userSpaceOnUse"
133+ id="SVGID_1_">
134+ <stop
135+ id="stop3935"
136+ style="stop-color:#FFFFFF"
137+ offset="0.1411" />
138+ <stop
139+ id="stop3937"
140+ style="stop-color:#FFFFFF;stop-opacity:0"
141+ offset="0.7423" />
142+ </linearGradient>
143+ <path
144+ id="path3939"
145+ d="m 760.82017,392.423 h -2 c 0,3.866 -3.134,7 -7,7 v 2 c 4.971,0 9,-4.029 9,-9 z"
146+ style="fill:#ffffff;fill-opacity:1" />
147+ </g>
148+ </g>
149+ </g>
150+</svg>
151
152=== modified file 'plugins/unityshell/resources/search_close.png'
153Binary files plugins/unityshell/resources/search_close.png 2011-04-10 22:12:46 +0000 and plugins/unityshell/resources/search_close.png 2012-03-13 16:31:20 +0000 differ
154=== added file 'plugins/unityshell/resources/search_close.svg'
155--- plugins/unityshell/resources/search_close.svg 1970-01-01 00:00:00 +0000
156+++ plugins/unityshell/resources/search_close.svg 2012-03-13 16:31:20 +0000
157@@ -0,0 +1,134 @@
158+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
159+<!-- Created with Inkscape (http://www.inkscape.org/) -->
160+
161+<svg
162+ xmlns:dc="http://purl.org/dc/elements/1.1/"
163+ xmlns:cc="http://creativecommons.org/ns#"
164+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
165+ xmlns:svg="http://www.w3.org/2000/svg"
166+ xmlns="http://www.w3.org/2000/svg"
167+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
168+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
169+ width="32"
170+ height="32"
171+ id="svg2"
172+ version="1.1"
173+ inkscape:version="0.47 r22583"
174+ sodipodi:docname="close.svg">
175+ <defs
176+ id="defs4">
177+ <inkscape:perspective
178+ sodipodi:type="inkscape:persp3d"
179+ inkscape:vp_x="0 : 526.18109 : 1"
180+ inkscape:vp_y="0 : 1000 : 0"
181+ inkscape:vp_z="744.09448 : 526.18109 : 1"
182+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
183+ id="perspective10" />
184+ <inkscape:perspective
185+ id="perspective2841"
186+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
187+ inkscape:vp_z="1 : 0.5 : 1"
188+ inkscape:vp_y="0 : 1000 : 0"
189+ inkscape:vp_x="0 : 0.5 : 1"
190+ sodipodi:type="inkscape:persp3d" />
191+ <inkscape:perspective
192+ id="perspective2858"
193+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
194+ inkscape:vp_z="1 : 0.5 : 1"
195+ inkscape:vp_y="0 : 1000 : 0"
196+ inkscape:vp_x="0 : 0.5 : 1"
197+ sodipodi:type="inkscape:persp3d" />
198+ <inkscape:perspective
199+ id="perspective2872"
200+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
201+ inkscape:vp_z="1 : 0.5 : 1"
202+ inkscape:vp_y="0 : 1000 : 0"
203+ inkscape:vp_x="0 : 0.5 : 1"
204+ sodipodi:type="inkscape:persp3d" />
205+ <inkscape:perspective
206+ id="perspective2968"
207+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
208+ inkscape:vp_z="1 : 0.5 : 1"
209+ inkscape:vp_y="0 : 1000 : 0"
210+ inkscape:vp_x="0 : 0.5 : 1"
211+ sodipodi:type="inkscape:persp3d" />
212+ <inkscape:perspective
213+ id="perspective2996"
214+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
215+ inkscape:vp_z="1 : 0.5 : 1"
216+ inkscape:vp_y="0 : 1000 : 0"
217+ inkscape:vp_x="0 : 0.5 : 1"
218+ sodipodi:type="inkscape:persp3d" />
219+ <inkscape:perspective
220+ id="perspective3840"
221+ inkscape:persp3d-origin="512 : 256 : 1"
222+ inkscape:vp_z="1024 : 384 : 1"
223+ inkscape:vp_y="0 : 1000 : 0"
224+ inkscape:vp_x="0 : 384 : 1"
225+ sodipodi:type="inkscape:persp3d" />
226+ <inkscape:perspective
227+ id="perspective3947"
228+ inkscape:persp3d-origin="512 : 256 : 1"
229+ inkscape:vp_z="1024 : 384 : 1"
230+ inkscape:vp_y="0 : 1000 : 0"
231+ inkscape:vp_x="0 : 384 : 1"
232+ sodipodi:type="inkscape:persp3d" />
233+ </defs>
234+ <sodipodi:namedview
235+ id="base"
236+ pagecolor="#ffffff"
237+ bordercolor="#666666"
238+ borderopacity="1.0"
239+ inkscape:pageopacity="0"
240+ inkscape:pageshadow="2"
241+ inkscape:zoom="30.5625"
242+ inkscape:cx="16"
243+ inkscape:cy="16"
244+ inkscape:document-units="px"
245+ inkscape:current-layer="g3950"
246+ showgrid="false"
247+ inkscape:window-width="1451"
248+ inkscape:window-height="975"
249+ inkscape:window-x="529"
250+ inkscape:window-y="51"
251+ inkscape:window-maximized="0" />
252+ <metadata
253+ id="metadata7">
254+ <rdf:RDF>
255+ <cc:Work
256+ rdf:about="">
257+ <dc:format>image/svg+xml</dc:format>
258+ <dc:type
259+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
260+ <dc:title />
261+ </cc:Work>
262+ </rdf:RDF>
263+ </metadata>
264+ <g
265+ inkscape:label="Layer 1"
266+ inkscape:groupmode="layer"
267+ id="layer1"
268+ transform="translate(0,-1020.3622)">
269+ <g
270+ id="g3950"
271+ transform="translate(-735.82017,643.9392)"
272+ style="fill:#2b0000">
273+ <rect
274+ id="rect3924"
275+ height="8.7959156"
276+ width="2.0459805"
277+ transform="matrix(0.70690675,-0.70730675,0.70730675,0.70690675,0,0)"
278+ y="804.776"
279+ x="252.88033"
280+ style="fill:#ffffff" />
281+ <rect
282+ id="rect3926"
283+ height="2.0031226"
284+ width="8.7665358"
285+ transform="matrix(0.70705678,-0.70715678,0.70715678,0.70705678,0,0)"
286+ y="808.11853"
287+ x="249.69171"
288+ style="fill:#ffffff" />
289+ </g>
290+ </g>
291+</svg>
292
293=== modified file 'plugins/unityshell/resources/search_magnify.png'
294Binary files plugins/unityshell/resources/search_magnify.png 2011-04-10 22:12:46 +0000 and plugins/unityshell/resources/search_magnify.png 2012-03-13 16:31:20 +0000 differ
295=== modified file 'plugins/unityshell/resources/search_spin.png'
296Binary files plugins/unityshell/resources/search_spin.png 2011-04-10 22:12:46 +0000 and plugins/unityshell/resources/search_spin.png 2012-03-13 16:31:20 +0000 differ
297=== added file 'plugins/unityshell/resources/search_spin.svg'
298--- plugins/unityshell/resources/search_spin.svg 1970-01-01 00:00:00 +0000
299+++ plugins/unityshell/resources/search_spin.svg 2012-03-13 16:31:20 +0000
300@@ -0,0 +1,174 @@
301+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
302+<!-- Created with Inkscape (http://www.inkscape.org/) -->
303+
304+<svg
305+ xmlns:dc="http://purl.org/dc/elements/1.1/"
306+ xmlns:cc="http://creativecommons.org/ns#"
307+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
308+ xmlns:svg="http://www.w3.org/2000/svg"
309+ xmlns="http://www.w3.org/2000/svg"
310+ xmlns:xlink="http://www.w3.org/1999/xlink"
311+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
312+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
313+ width="32"
314+ height="32"
315+ id="svg2"
316+ version="1.1"
317+ inkscape:version="0.47 r22583"
318+ sodipodi:docname="search.svg">
319+ <defs
320+ id="defs4">
321+ <linearGradient
322+ inkscape:collect="always"
323+ id="linearGradient4563">
324+ <stop
325+ style="stop-color:#ffffff;stop-opacity:1;"
326+ offset="0"
327+ id="stop4565" />
328+ <stop
329+ style="stop-color:#ffffff;stop-opacity:0;"
330+ offset="1"
331+ id="stop4567" />
332+ </linearGradient>
333+ <inkscape:perspective
334+ sodipodi:type="inkscape:persp3d"
335+ inkscape:vp_x="0 : 526.18109 : 1"
336+ inkscape:vp_y="0 : 1000 : 0"
337+ inkscape:vp_z="744.09448 : 526.18109 : 1"
338+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
339+ id="perspective10" />
340+ <inkscape:perspective
341+ id="perspective2841"
342+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
343+ inkscape:vp_z="1 : 0.5 : 1"
344+ inkscape:vp_y="0 : 1000 : 0"
345+ inkscape:vp_x="0 : 0.5 : 1"
346+ sodipodi:type="inkscape:persp3d" />
347+ <inkscape:perspective
348+ id="perspective2858"
349+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
350+ inkscape:vp_z="1 : 0.5 : 1"
351+ inkscape:vp_y="0 : 1000 : 0"
352+ inkscape:vp_x="0 : 0.5 : 1"
353+ sodipodi:type="inkscape:persp3d" />
354+ <inkscape:perspective
355+ id="perspective2872"
356+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
357+ inkscape:vp_z="1 : 0.5 : 1"
358+ inkscape:vp_y="0 : 1000 : 0"
359+ inkscape:vp_x="0 : 0.5 : 1"
360+ sodipodi:type="inkscape:persp3d" />
361+ <inkscape:perspective
362+ id="perspective2968"
363+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
364+ inkscape:vp_z="1 : 0.5 : 1"
365+ inkscape:vp_y="0 : 1000 : 0"
366+ inkscape:vp_x="0 : 0.5 : 1"
367+ sodipodi:type="inkscape:persp3d" />
368+ <inkscape:perspective
369+ id="perspective2996"
370+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
371+ inkscape:vp_z="1 : 0.5 : 1"
372+ inkscape:vp_y="0 : 1000 : 0"
373+ inkscape:vp_x="0 : 0.5 : 1"
374+ sodipodi:type="inkscape:persp3d" />
375+ <inkscape:perspective
376+ id="perspective3840"
377+ inkscape:persp3d-origin="512 : 256 : 1"
378+ inkscape:vp_z="1024 : 384 : 1"
379+ inkscape:vp_y="0 : 1000 : 0"
380+ inkscape:vp_x="0 : 384 : 1"
381+ sodipodi:type="inkscape:persp3d" />
382+ <inkscape:perspective
383+ id="perspective3947"
384+ inkscape:persp3d-origin="512 : 256 : 1"
385+ inkscape:vp_z="1024 : 384 : 1"
386+ inkscape:vp_y="0 : 1000 : 0"
387+ inkscape:vp_x="0 : 384 : 1"
388+ sodipodi:type="inkscape:persp3d" />
389+ <linearGradient
390+ inkscape:collect="always"
391+ xlink:href="#linearGradient4563"
392+ id="linearGradient4569"
393+ x1="751.82017"
394+ y1="396.923"
395+ x2="754.34198"
396+ y2="394.51682"
397+ gradientUnits="userSpaceOnUse" />
398+ </defs>
399+ <sodipodi:namedview
400+ id="base"
401+ pagecolor="#ffffff"
402+ bordercolor="#666666"
403+ borderopacity="1.0"
404+ inkscape:pageopacity="0"
405+ inkscape:pageshadow="2"
406+ inkscape:zoom="21.610951"
407+ inkscape:cx="19.076277"
408+ inkscape:cy="14.90749"
409+ inkscape:document-units="px"
410+ inkscape:current-layer="g3950"
411+ showgrid="false"
412+ inkscape:window-width="1451"
413+ inkscape:window-height="975"
414+ inkscape:window-x="98"
415+ inkscape:window-y="155"
416+ inkscape:window-maximized="0" />
417+ <metadata
418+ id="metadata7">
419+ <rdf:RDF>
420+ <cc:Work
421+ rdf:about="">
422+ <dc:format>image/svg+xml</dc:format>
423+ <dc:type
424+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
425+ <dc:title></dc:title>
426+ </cc:Work>
427+ </rdf:RDF>
428+ </metadata>
429+ <g
430+ inkscape:label="Layer 1"
431+ inkscape:groupmode="layer"
432+ id="layer1"
433+ transform="translate(0,-1020.3622)">
434+ <g
435+ id="g3950"
436+ transform="translate(-735.82017,643.9392)"
437+ style="fill:#2b0000">
438+ <g
439+ id="g3928"
440+ style="fill:#ffffff">
441+
442+ <path
443+ id="path3932"
444+ d="m 744.82017,392.423 c 0,-3.866 3.134,-7 7,-7 3.866,0 7,3.134 7,7 h 2 c 0,-4.971 -4.029,-9 -9,-9 -4.971,0 -9,4.029 -9,9 0,4.971 4.029,9 9,9 v -2 c -3.866,0 -7,-3.134 -7,-7 z"
445+ style="fill:#ffffff" />
446+
447+ <linearGradient
448+ y2="391.6506"
449+ x2="753.69513"
450+ y1="402.29791"
451+ x1="747.54791"
452+ gradientUnits="userSpaceOnUse"
453+ id="SVGID_1_">
454+ <stop
455+ id="stop3935"
456+ style="stop-color:#FFFFFF"
457+ offset="0.1411" />
458+
459+ <stop
460+ id="stop3937"
461+ style="stop-color:#FFFFFF;stop-opacity:0"
462+ offset="0.7423" />
463+
464+ </linearGradient>
465+
466+ <path
467+ id="path3939"
468+ d="m 760.82017,392.423 h -2 c 0,3.866 -3.134,7 -7,7 v 2 c 4.971,0 9,-4.029 9,-9 z"
469+ style="fill:url(#linearGradient4569);fill-opacity:1" />
470+
471+</g>
472+ </g>
473+ </g>
474+</svg>
475
476=== modified file 'plugins/unityshell/src/DashStyle.cpp'
477--- plugins/unityshell/src/DashStyle.cpp 2012-02-24 15:19:35 +0000
478+++ plugins/unityshell/src/DashStyle.cpp 2012-03-13 16:31:20 +0000
479@@ -88,12 +88,13 @@
480 class LazyLoadTexture
481 {
482 public:
483- LazyLoadTexture(std::string const& filename);
484+ LazyLoadTexture(std::string const& filename, int size = -1);
485 nux::BaseTexture* texture();
486 private:
487 void LoadTexture();
488 private:
489 std::string filename_;
490+ int size_;
491 BaseTexturePtr texture_;
492 };
493
494@@ -120,7 +121,7 @@
495 nux::Color const& color,
496 std::string const& label,
497 int font_size = -1,
498- double horizMargin = 10.0,
499+ double horizMargin = 4.0,
500 Alignment alignment = Alignment::CENTER);
501
502 void ButtonOutlinePath(cairo_t* cr, bool align);
503@@ -205,6 +206,7 @@
504 LazyLoadTexture dash_shine_;
505
506 LazyLoadTexture search_magnify_texture_;
507+ LazyLoadTexture search_circle_texture_;
508 LazyLoadTexture search_close_texture_;
509 LazyLoadTexture search_spin_texture_;
510
511@@ -240,8 +242,9 @@
512 , dash_top_tile_("/dash_top_tile.png")
513 , dash_shine_("/dash_sheen.png")
514 , search_magnify_texture_("/search_magnify.png")
515- , search_close_texture_("/search_close.png")
516- , search_spin_texture_("/search_spin.png")
517+ , search_circle_texture_("/search_circle.svg", 32)
518+ , search_close_texture_("/search_close.svg", 32)
519+ , search_spin_texture_("/search_spin.svg", 32)
520 , group_unexpand_texture_("/dash_group_unexpand.png")
521 , group_expand_texture_("/dash_group_expand.png")
522 , star_deselected_texture_("/star_deselected.png")
523@@ -1559,7 +1562,7 @@
524 pimpl->button_label_text_color_[state],
525 label,
526 font_size,
527- 10.0,
528+ 11.0, // 15px = 11pt
529 alignment);
530
531 return true;
532@@ -1814,7 +1817,7 @@
533 pimpl->Text(cr,
534 pimpl->button_label_text_color_[state],
535 label,
536- 1.0);
537+ 10); // 13px = 10pt
538
539 return true;
540 }
541@@ -2105,6 +2108,11 @@
542 return pimpl->search_magnify_texture_.texture();
543 }
544
545+nux::BaseTexture* Style::GetSearchCircleIcon()
546+{
547+ return pimpl->search_circle_texture_.texture();
548+}
549+
550 nux::BaseTexture* Style::GetSearchCloseIcon()
551 {
552 return pimpl->search_close_texture_.texture();
553@@ -2149,8 +2157,9 @@
554 namespace
555 {
556
557-LazyLoadTexture::LazyLoadTexture(std::string const& filename)
558+LazyLoadTexture::LazyLoadTexture(std::string const& filename, int size)
559 : filename_(filename)
560+ , size_(size)
561 {
562 }
563
564@@ -2167,7 +2176,7 @@
565 glib::Object<GdkPixbuf> pixbuf;
566 glib::Error error;
567
568- pixbuf = ::gdk_pixbuf_new_from_file(full_path.c_str(), &error);
569+ pixbuf = ::gdk_pixbuf_new_from_file_at_size(full_path.c_str(), size_, size_, &error);
570 if (error)
571 {
572 LOG_WARN(logger) << "Unable to texture " << full_path << ": " << error;
573
574=== modified file 'plugins/unityshell/src/DashStyle.h'
575--- plugins/unityshell/src/DashStyle.h 2012-02-24 15:19:35 +0000
576+++ plugins/unityshell/src/DashStyle.h 2012-03-13 16:31:20 +0000
577@@ -178,6 +178,7 @@
578 nux::BaseTexture* GetDashShine();
579
580 nux::BaseTexture* GetSearchMagnifyIcon();
581+ nux::BaseTexture* GetSearchCircleIcon();
582 nux::BaseTexture* GetSearchCloseIcon();
583 nux::BaseTexture* GetSearchSpinIcon();
584
585
586=== modified file 'plugins/unityshell/src/FilterExpanderLabel.cpp'
587--- plugins/unityshell/src/FilterExpanderLabel.cpp 2012-02-21 01:16:53 +0000
588+++ plugins/unityshell/src/FilterExpanderLabel.cpp 2012-03-13 16:31:20 +0000
589@@ -47,6 +47,9 @@
590 const int HIGHLIGHT_HEIGHT = 34;
591 const int HIGHLIGHT_WIDTH_SUBTRACTOR = 5;
592
593+// font
594+const char* const FONT_EXPANDER_LABEL = "Ubuntu Bold 13"; // 17px = 13
595+
596 class ExpanderView : public nux::View
597 {
598 public:
599@@ -102,7 +105,7 @@
600 , right_hand_contents_(nullptr)
601 , cairo_label_(nullptr)
602 , raw_label_(label)
603- , label_("<span size='larger' weight='bold'>" + label + "</span>")
604+ , label_("label")
605 {
606 expanded.changed.connect(sigc::mem_fun(this, &FilterExpanderLabel::DoExpandChange));
607 BuildLayout();
608@@ -118,10 +121,7 @@
609 {
610 raw_label_ = label;
611
612- label_ = "<span size='larger' weight='bold'>";
613- label_ += raw_label_;
614- label_ += "</span>";
615- cairo_label_->SetText(label_.c_str());
616+ cairo_label_->SetText(label.c_str());
617 }
618
619 void FilterExpanderLabel::SetRightHandView(nux::View* view)
620@@ -159,10 +159,10 @@
621 expander_view_->SetLayout(expander_layout_);
622 top_bar_layout_->AddView(expander_view_, 0);
623
624- cairo_label_ = new nux::StaticText(label_.c_str(), NUX_TRACKER_LOCATION);
625- cairo_label_->SetFontName("Ubuntu 10");
626+ cairo_label_ = new nux::StaticCairoText(label_.c_str(), NUX_TRACKER_LOCATION);
627+ cairo_label_->SetFont(FONT_EXPANDER_LABEL);
628 cairo_label_->SetTextColor(nux::color::White);
629- cairo_label_->SetAcceptKeyNavFocusOnMouseDown(false);
630+ cairo_label_->SetAcceptKeyboardEvent(false);
631
632 nux::BaseTexture* arrow;
633 arrow = dash::Style::Instance().GetGroupUnexpandIcon();
634
635=== modified file 'plugins/unityshell/src/FilterExpanderLabel.h'
636--- plugins/unityshell/src/FilterExpanderLabel.h 2012-02-21 00:11:20 +0000
637+++ plugins/unityshell/src/FilterExpanderLabel.h 2012-03-13 16:31:20 +0000
638@@ -30,11 +30,11 @@
639 #include <Nux/HLayout.h>
640 #include <Nux/View.h>
641 #include <Nux/VLayout.h>
642-#include <Nux/StaticText.h>
643 #include <UnityCore/Filter.h>
644
645 #include "IconTexture.h"
646 #include "Introspectable.h"
647+#include "StaticCairoText.h"
648
649 namespace nux
650 {
651@@ -81,7 +81,7 @@
652 nux::View* expander_view_;
653 nux::LinearLayout* expander_layout_;
654 nux::View* right_hand_contents_;
655- nux::StaticText* cairo_label_;
656+ nux::StaticCairoText* cairo_label_;
657 std::string raw_label_;
658 std::string label_;
659 nux::VLayout* arrow_layout_;
660
661=== modified file 'plugins/unityshell/src/FilterMultiRangeButton.cpp'
662--- plugins/unityshell/src/FilterMultiRangeButton.cpp 2012-02-17 16:48:25 +0000
663+++ plugins/unityshell/src/FilterMultiRangeButton.cpp 2012-03-13 16:31:20 +0000
664@@ -158,12 +158,10 @@
665 MultiRangeSide faked_side)
666 {
667 std::string name("10");
668- std::stringstream final;
669
670 if (filter_)
671 {
672 name = filter_->name;
673- final << "<small>" << name << "</small>";
674 }
675
676 Arrow arrow;
677@@ -184,7 +182,7 @@
678 else
679 segment = Segment::RIGHT;
680
681- Style::Instance().MultiRangeSegment(cr, faked_state, final.str(), arrow, segment);
682+ Style::Instance().MultiRangeSegment(cr, faked_state, name, arrow, segment);
683 NeedRedraw();
684 }
685
686
687=== modified file 'plugins/unityshell/src/PlacesGroup.cpp'
688--- plugins/unityshell/src/PlacesGroup.cpp 2012-03-13 07:31:25 +0000
689+++ plugins/unityshell/src/PlacesGroup.cpp 2012-03-13 16:31:20 +0000
690@@ -50,10 +50,8 @@
691 namespace
692 {
693
694-const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 1.0f);
695-const nux::Color kExpandHoverTextColor(1.0f, 1.0f, 1.0f, 1.0f);
696-const float kExpandDefaultIconOpacity = 1.0f;
697-const float kExpandHoverIconOpacity = 1.0f;
698+const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 0.5f);
699+const float kExpandDefaultIconOpacity = 0.5f;
700
701 // Category highlight
702 const int kHighlightHeight = 24;
703@@ -64,6 +62,10 @@
704 const int kSeparatorLeftPadding = 16;
705 const int kSeparatorWidthSubtractor = 10;
706
707+// Font
708+const char* const NAME_LABEL_FONT = "Ubuntu 13"; // 17px = 13
709+const char* const EXPANDER_LABEL_FONT = "Ubuntu 10"; // 13px = 10
710+
711 class HeaderView : public nux::View
712 {
713 public:
714@@ -142,6 +144,7 @@
715 _header_layout->AddLayout(_text_layout, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
716
717 _name = new nux::StaticCairoText("", NUX_TRACKER_LOCATION);
718+ _name->SetFont(NAME_LABEL_FONT);
719 _name->SetTextEllipsize(nux::StaticCairoText::NUX_ELLIPSIZE_END);
720 _name->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);
721 _text_layout->AddView(_name, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
722@@ -150,12 +153,15 @@
723 _expand_layout->SetHorizontalInternalMargin(8);
724 _text_layout->AddLayout(_expand_layout, 0, nux::MINOR_POSITION_END, nux::MINOR_SIZE_MATCHCONTENT);
725
726+ _expand_label_layout = new nux::HLayout(NUX_TRACKER_LOCATION);
727+ _expand_layout->AddLayout(_expand_label_layout, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
728+
729 _expand_label = new nux::StaticCairoText("", NUX_TRACKER_LOCATION);
730+ _expand_label->SetFont(EXPANDER_LABEL_FONT);
731 _expand_label->SetTextEllipsize(nux::StaticCairoText::NUX_ELLIPSIZE_END);
732 _expand_label->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);
733 _expand_label->SetTextColor(kExpandDefaultTextColor);
734-
735- _expand_layout->AddView(_expand_label, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
736+ _expand_label_layout->AddView(_expand_label, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
737
738 _expand_icon = new IconTexture(arrow, arrow->GetWidth(), arrow->GetHeight());
739 _expand_icon->SetOpacity(kExpandDefaultIconOpacity);
740@@ -278,9 +284,7 @@
741 void
742 PlacesGroup::RefreshLabel()
743 {
744- const char* temp = "<span size='small'>%s</span>";
745 char* result_string;
746- char* final;
747
748 if (_n_visible_items_in_unexpand_mode >= _n_total_items)
749 {
750@@ -305,9 +309,8 @@
751 SetName(tmpname);
752 g_free(tmpname);
753
754- final = g_strdup_printf(temp, result_string);
755
756- _expand_label->SetText(final);
757+ _expand_label->SetText(result_string);
758 _expand_label->SetVisible(_n_visible_items_in_unexpand_mode < _n_total_items);
759
760 // See bug #748101 ("Dash - "See more..." line should be base-aligned with section header")
761@@ -317,12 +320,11 @@
762 int bottom_padding = _name->GetBaseHeight() - _name->GetBaseline() -
763 (_expand_label->GetBaseHeight() - _expand_label->GetBaseline());
764
765- _expand_layout->SetTopAndBottomPadding(0, bottom_padding);
766+ _expand_label_layout->SetTopAndBottomPadding(0, bottom_padding);
767
768 QueueDraw();
769
770- g_free((result_string));
771- g_free(final);
772+ g_free(result_string);
773 }
774
775 void
776
777=== modified file 'plugins/unityshell/src/PlacesGroup.h'
778--- plugins/unityshell/src/PlacesGroup.h 2012-03-09 21:36:35 +0000
779+++ plugins/unityshell/src/PlacesGroup.h 2012-03-13 16:31:20 +0000
780@@ -105,6 +105,7 @@
781 nux::View* _header_view;
782 nux::HLayout* _header_layout;
783 nux::HLayout* _text_layout;
784+ nux::HLayout* _expand_label_layout;
785 nux::HLayout* _expand_layout;
786 nux::View* _child_view;
787 nux::AbstractPaintLayer* _focus_layer;
788
789=== modified file 'plugins/unityshell/src/ResultRendererTile.cpp'
790--- plugins/unityshell/src/ResultRendererTile.cpp 2011-10-03 23:21:55 +0000
791+++ plugins/unityshell/src/ResultRendererTile.cpp 2012-03-13 16:31:20 +0000
792@@ -51,6 +51,9 @@
793 namespace
794 {
795 nux::logging::Logger logger("unity.dash.results");
796+
797+const int FONT_SIZE = 10;
798+
799 }
800
801 namespace dash
802@@ -423,7 +426,7 @@
803 cairo_set_font_options(cr, gdk_screen_get_font_options(screen));
804 layout = pango_cairo_create_layout(cr);
805 desc = pango_font_description_from_string(font.Value());
806- pango_font_description_set_size (desc, 9 * PANGO_SCALE);
807+ pango_font_description_set_size (desc, FONT_SIZE * PANGO_SCALE);
808
809 pango_layout_set_font_description(layout, desc);
810 pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
811
812=== modified file 'plugins/unityshell/src/SearchBar.cpp'
813--- plugins/unityshell/src/SearchBar.cpp 2012-02-23 21:48:26 +0000
814+++ plugins/unityshell/src/SearchBar.cpp 2012-03-13 16:31:20 +0000
815@@ -51,11 +51,29 @@
816 const int LIVE_SEARCH_TIMEOUT = 40;
817 const int SPINNER_TIMEOUT = 100;
818
819+const int SPINNER_HEIGHT = 48; // To don't break the current layout, let's use a fixed height for the spinner.
820+const int SPACE_BETWEEN_SPINNER_AND_TEXT = 4;
821+const int LEFT_INTERNAL_PADDING = 9;
822+
823+
824 // Highlight
825 const int HIGHLIGHT_HEIGHT = 24;
826 const int HIGHLIGHT_WIDTH = 292;
827 const int HIGHLIGHT_LEFT_PADDING = 5;
828 const int HIGHLIGHT_RIGHT_PADDING = 4;
829+
830+// Fonts
831+const std::string HINT_LABEL_FONT_SIZE = "20px";
832+const std::string HINT_LABEL_FONT_STYLE = "Italic";
833+const std::string HINT_LABEL_DEFAULT_FONT = "Ubuntu " + HINT_LABEL_FONT_STYLE + " " + HINT_LABEL_FONT_SIZE;
834+
835+const std::string PANGO_ENTRY_DEFAULT_FONT_FAMILY = "Ubuntu";
836+const int PANGO_ENTRY_FONT_SIZE = 22;
837+
838+const std::string SHOW_FILTERS_LABEL_FONT_SIZE = "13";
839+const std::string SHOW_FILTERS_LABEL_FONT_STYLE = "Bold";
840+const std::string SHOW_FILTERS_LABEL_DEFAULT_FONT = "Ubuntu " + SHOW_FILTERS_LABEL_FONT_STYLE + " " + SHOW_FILTERS_LABEL_FONT_SIZE;
841+
842 }
843
844 namespace
845@@ -160,21 +178,28 @@
846 bg_layer_ = new nux::ColorLayer(nux::Color(0xff595853), true);
847
848 layout_ = new nux::HLayout(NUX_TRACKER_LOCATION);
849- layout_->SetHorizontalInternalMargin(0);
850- layout_->SetVerticalExternalMargin(external_margin_vertical);
851- layout_->SetHorizontalExternalMargin(external_margin_horizontal);
852+ layout_->SetHorizontalInternalMargin(SPACE_BETWEEN_SPINNER_AND_TEXT);
853+ layout_->SetTopAndBottomPadding(external_margin_vertical);
854+ layout_->SetLeftAndRightPadding(external_margin_horizontal + LEFT_INTERNAL_PADDING, external_margin_horizontal);
855 SetLayout(layout_);
856
857 spinner_ = new SearchBarSpinner();
858- spinner_->SetMinMaxSize(icon->GetWidth(), icon->GetHeight());
859+ spinner_->SetMinimumHeight(SPINNER_HEIGHT);
860+ spinner_->SetMaximumHeight(SPINNER_HEIGHT);
861 spinner_->mouse_click.connect(sigc::mem_fun(this, &SearchBar::OnClearClicked));
862 layout_->AddView(spinner_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
863
864+ nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION);
865+
866 hint_ = new nux::StaticCairoText(" ");
867 hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f));
868 hint_->SetMaximumWidth(search_bar_width_ - icon->GetWidth());
869+ hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str());
870+ hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
871
872 pango_entry_ = new IMTextEntry();
873+ pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str());
874+ pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE);
875 pango_entry_->text_changed.connect(sigc::mem_fun(this, &SearchBar::OnSearchChanged));
876 pango_entry_->activated.connect([&]() { activated.emit(); });
877 pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });
878@@ -183,7 +208,7 @@
879 pango_entry_->SetMaximumWidth(search_bar_width_ - 1.5 * icon->GetWidth());
880
881 layered_layout_ = new nux::LayeredLayout();
882- layered_layout_->AddLayer(hint_);
883+ layered_layout_->AddLayout(hint_layout);
884 layered_layout_->AddLayer(pango_entry_);
885 layered_layout_->SetPaintAll(true);
886 layered_layout_->SetActiveLayerN(1);
887@@ -193,11 +218,11 @@
888
889 if (show_filter_hint_)
890 {
891- std::string filter_str(_("<small><b>Filter results</b></small>"));
892+ std::string filter_str(_("Filter results"));
893 show_filters_ = new nux::StaticCairoText(filter_str.c_str());
894 show_filters_->SetVisible(false);
895- show_filters_->SetFont("Ubuntu 10");
896- show_filters_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 1.0f));
897+ show_filters_->SetFont(SHOW_FILTERS_LABEL_DEFAULT_FONT.c_str());
898+ show_filters_->SetTextColor(nux::color::White);
899 show_filters_->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);
900
901 nux::BaseTexture* arrow;
902@@ -298,44 +323,35 @@
903
904 void SearchBar::OnFontChanged(GtkSettings* settings, GParamSpec* pspec)
905 {
906- static const int HOW_LARGE = 8;
907 gchar* font_name = NULL;
908 PangoFontDescription* desc;
909- gint size;
910- gchar* font_desc;
911+ std::ostringstream font_desc;
912
913 g_object_get(settings, "gtk-font-name", &font_name, NULL);
914
915 desc = pango_font_description_from_string(font_name);
916 pango_entry_->SetFontFamily(pango_font_description_get_family(desc));
917-
918- size = pango_font_description_get_size(desc);
919- size /= pango_font_description_get_size_is_absolute(desc) ? 1 : PANGO_SCALE;
920- pango_entry_->SetFontSize(size + HOW_LARGE);
921-
922+ pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE);
923 pango_entry_->SetFontOptions(gdk_screen_get_font_options(gdk_screen_get_default()));
924
925- font_desc = g_strdup_printf("%s %d", pango_font_description_get_family(desc), size + HOW_LARGE);
926- hint_->SetFont(font_desc);
927+ font_desc << pango_font_description_get_family(desc) << " " << HINT_LABEL_FONT_STYLE << " " << HINT_LABEL_FONT_SIZE;
928+ hint_->SetFont(font_desc.str().c_str());
929
930- g_free(font_desc);
931- font_desc = g_strdup_printf("%s %d", pango_font_description_get_family(desc), size + HOW_LARGE/2);
932- show_filters_->SetFont(font_desc);
933+ font_desc.str("");
934+ font_desc.clear();
935+ font_desc << pango_font_description_get_family(desc) << " " << SHOW_FILTERS_LABEL_FONT_STYLE << " " << SHOW_FILTERS_LABEL_FONT_SIZE;
936+ show_filters_->SetFont(font_desc.str().c_str());
937
938 pango_font_description_free(desc);
939 g_free(font_name);
940- g_free(font_desc);
941 }
942
943 void SearchBar::OnSearchHintChanged()
944 {
945- std::string hint = search_hint;
946- gchar* tmp = g_markup_escape_text(hint.c_str(), -1);
947-
948- gchar* markup = g_strdup_printf("<span font_size='small' font_style='italic'> %s </span>", tmp);
949- hint_->SetText(markup);
950-
951- g_free(markup);
952+ gchar* tmp = g_markup_escape_text(search_hint().c_str(), -1);
953+
954+ hint_->SetText(tmp);
955+
956 g_free(tmp);
957 }
958
959@@ -583,14 +599,15 @@
960
961 void SearchBar::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key)
962 {
963- search_hint = "";
964+ hint_->SetVisible(false);
965 }
966
967 void SearchBar::OnEndKeyFocus()
968 {
969- search_hint = _("Search");
970+ hint_->SetVisible(search_string().empty());
971 }
972
973+
974 nux::TextEntry* SearchBar::text_entry() const
975 {
976 return pango_entry_;
977
978=== modified file 'plugins/unityshell/src/SearchBarSpinner.cpp'
979--- plugins/unityshell/src/SearchBarSpinner.cpp 2012-03-01 01:47:18 +0000
980+++ plugins/unityshell/src/SearchBarSpinner.cpp 2012-03-13 16:31:20 +0000
981@@ -39,6 +39,7 @@
982 dash::Style& style = dash::Style::Instance();
983
984 _magnify = style.GetSearchMagnifyIcon();
985+ _circle = style.GetSearchCircleIcon();
986 _close = style.GetSearchCloseIcon();
987 _spin = style.GetSearchSpinIcon();
988
989@@ -112,24 +113,13 @@
990 }
991 else
992 {
993- texxform.FlipVCoord(true);
994- GfxContext.QRP_1Tex(geo.x + ((geo.width - _spin->GetWidth()) / 2),
995- geo.y + ((geo.height - _spin->GetHeight()) / 2),
996- _spin->GetWidth(),
997- _spin->GetHeight(),
998- _spin->GetDeviceTexture(),
999- texxform,
1000- nux::color::White);
1001- texxform.FlipVCoord(false);
1002-
1003- GfxContext.QRP_1Tex(geo.x + ((geo.width - _spin->GetWidth()) / 2),
1004- geo.y + ((geo.height - _spin->GetHeight()) / 2),
1005- _spin->GetWidth(),
1006- _spin->GetHeight(),
1007- _spin->GetDeviceTexture(),
1008- texxform,
1009- nux::color::White);
1010-
1011+ GfxContext.QRP_1Tex(geo.x + ((geo.width - _circle->GetWidth()) / 2),
1012+ geo.y + ((geo.height - _circle->GetHeight()) / 2),
1013+ _circle->GetWidth(),
1014+ _circle->GetHeight(),
1015+ _circle->GetDeviceTexture(),
1016+ texxform,
1017+ nux::color::White);
1018
1019 GfxContext.QRP_1Tex(geo.x + ((geo.width - _close->GetWidth()) / 2),
1020 geo.y + ((geo.height - _close->GetHeight()) / 2),
1021
1022=== modified file 'plugins/unityshell/src/SearchBarSpinner.h'
1023--- plugins/unityshell/src/SearchBarSpinner.h 2012-02-07 07:42:12 +0000
1024+++ plugins/unityshell/src/SearchBarSpinner.h 2012-03-13 16:31:20 +0000
1025@@ -65,10 +65,9 @@
1026 SpinnerState _state;
1027
1028 nux::BaseTexture* _magnify;
1029+ nux::BaseTexture* _circle;
1030 nux::BaseTexture* _close;
1031- nux::BaseTexture* _close_glow;
1032 nux::BaseTexture* _spin;
1033- nux::BaseTexture* _spin_glow;
1034
1035 nux::Matrix4 _2d_rotate;
1036 float _rotation;
1037
1038=== modified file 'plugins/unityshell/src/StaticCairoText.cpp'
1039--- plugins/unityshell/src/StaticCairoText.cpp 2012-02-29 09:59:09 +0000
1040+++ plugins/unityshell/src/StaticCairoText.cpp 2012-03-13 16:31:20 +0000
1041@@ -308,6 +308,7 @@
1042 PangoLayout* layout = NULL;
1043 PangoFontDescription* desc = NULL;
1044 PangoContext* pangoCtx = NULL;
1045+ PangoRectangle inkRect = {0, 0, 0, 0};
1046 PangoRectangle logRect = {0, 0, 0, 0};
1047 int dpi = 0;
1048 GdkScreen* screen = gdk_screen_get_default(); // is not ref'ed
1049@@ -370,9 +371,14 @@
1050 (float) dpi / (float) PANGO_SCALE);
1051 }
1052 pango_layout_context_changed(layout);
1053- pango_layout_get_extents(layout, NULL, &logRect);
1054-
1055- width = logRect.width / PANGO_SCALE;
1056+ pango_layout_get_extents(layout, &inkRect, &logRect);
1057+
1058+ // logRect has some issues using italic style
1059+ if (inkRect.x + inkRect.width > logRect.x + logRect.width)
1060+ width = (inkRect.x + inkRect.width - logRect.x) /PANGO_SCALE;
1061+ else
1062+ width = logRect.width / PANGO_SCALE;
1063+
1064 height = logRect.height / PANGO_SCALE;
1065 _cached_extent_height = height;
1066 _cached_extent_width = width;