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
=== added file 'plugins/unityshell/resources/search_circle.svg'
--- plugins/unityshell/resources/search_circle.svg 1970-01-01 00:00:00 +0000
+++ plugins/unityshell/resources/search_circle.svg 2012-03-13 16:31:20 +0000
@@ -0,0 +1,146 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="32"
13 height="32"
14 id="svg2"
15 version="1.1"
16 inkscape:version="0.47 r22583"
17 sodipodi:docname="close.svg">
18 <defs
19 id="defs4">
20 <inkscape:perspective
21 sodipodi:type="inkscape:persp3d"
22 inkscape:vp_x="0 : 526.18109 : 1"
23 inkscape:vp_y="0 : 1000 : 0"
24 inkscape:vp_z="744.09448 : 526.18109 : 1"
25 inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
26 id="perspective10" />
27 <inkscape:perspective
28 id="perspective2841"
29 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
30 inkscape:vp_z="1 : 0.5 : 1"
31 inkscape:vp_y="0 : 1000 : 0"
32 inkscape:vp_x="0 : 0.5 : 1"
33 sodipodi:type="inkscape:persp3d" />
34 <inkscape:perspective
35 id="perspective2858"
36 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
37 inkscape:vp_z="1 : 0.5 : 1"
38 inkscape:vp_y="0 : 1000 : 0"
39 inkscape:vp_x="0 : 0.5 : 1"
40 sodipodi:type="inkscape:persp3d" />
41 <inkscape:perspective
42 id="perspective2872"
43 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
44 inkscape:vp_z="1 : 0.5 : 1"
45 inkscape:vp_y="0 : 1000 : 0"
46 inkscape:vp_x="0 : 0.5 : 1"
47 sodipodi:type="inkscape:persp3d" />
48 <inkscape:perspective
49 id="perspective2968"
50 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
51 inkscape:vp_z="1 : 0.5 : 1"
52 inkscape:vp_y="0 : 1000 : 0"
53 inkscape:vp_x="0 : 0.5 : 1"
54 sodipodi:type="inkscape:persp3d" />
55 <inkscape:perspective
56 id="perspective2996"
57 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
58 inkscape:vp_z="1 : 0.5 : 1"
59 inkscape:vp_y="0 : 1000 : 0"
60 inkscape:vp_x="0 : 0.5 : 1"
61 sodipodi:type="inkscape:persp3d" />
62 <inkscape:perspective
63 id="perspective3840"
64 inkscape:persp3d-origin="512 : 256 : 1"
65 inkscape:vp_z="1024 : 384 : 1"
66 inkscape:vp_y="0 : 1000 : 0"
67 inkscape:vp_x="0 : 384 : 1"
68 sodipodi:type="inkscape:persp3d" />
69 <inkscape:perspective
70 id="perspective3947"
71 inkscape:persp3d-origin="512 : 256 : 1"
72 inkscape:vp_z="1024 : 384 : 1"
73 inkscape:vp_y="0 : 1000 : 0"
74 inkscape:vp_x="0 : 384 : 1"
75 sodipodi:type="inkscape:persp3d" />
76 </defs>
77 <sodipodi:namedview
78 id="base"
79 pagecolor="#ffffff"
80 bordercolor="#666666"
81 borderopacity="1.0"
82 inkscape:pageopacity="0"
83 inkscape:pageshadow="2"
84 inkscape:zoom="30.5625"
85 inkscape:cx="16"
86 inkscape:cy="16"
87 inkscape:document-units="px"
88 inkscape:current-layer="g3950"
89 showgrid="false"
90 inkscape:window-width="1451"
91 inkscape:window-height="975"
92 inkscape:window-x="529"
93 inkscape:window-y="51"
94 inkscape:window-maximized="0" />
95 <metadata
96 id="metadata7">
97 <rdf:RDF>
98 <cc:Work
99 rdf:about="">
100 <dc:format>image/svg+xml</dc:format>
101 <dc:type
102 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
103 <dc:title></dc:title>
104 </cc:Work>
105 </rdf:RDF>
106 </metadata>
107 <g
108 inkscape:label="Layer 1"
109 inkscape:groupmode="layer"
110 id="layer1"
111 transform="translate(0,-1020.3622)">
112 <g
113 id="g3950"
114 transform="translate(-735.82017,643.9392)"
115 style="fill:#2b0000">
116 <g
117 id="g3928"
118 style="fill:#ffffff">
119 <path
120 id="path3932"
121 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"
122 style="fill:#ffffff" />
123 <linearGradient
124 y2="391.6506"
125 x2="753.69513"
126 y1="402.29791"
127 x1="747.54791"
128 gradientUnits="userSpaceOnUse"
129 id="SVGID_1_">
130 <stop
131 id="stop3935"
132 style="stop-color:#FFFFFF"
133 offset="0.1411" />
134 <stop
135 id="stop3937"
136 style="stop-color:#FFFFFF;stop-opacity:0"
137 offset="0.7423" />
138 </linearGradient>
139 <path
140 id="path3939"
141 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"
142 style="fill:#ffffff;fill-opacity:1" />
143 </g>
144 </g>
145 </g>
146</svg>
0147
=== modified file 'plugins/unityshell/resources/search_close.png'
1Binary 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 differ148Binary 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
=== added file 'plugins/unityshell/resources/search_close.svg'
--- plugins/unityshell/resources/search_close.svg 1970-01-01 00:00:00 +0000
+++ plugins/unityshell/resources/search_close.svg 2012-03-13 16:31:20 +0000
@@ -0,0 +1,134 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="32"
13 height="32"
14 id="svg2"
15 version="1.1"
16 inkscape:version="0.47 r22583"
17 sodipodi:docname="close.svg">
18 <defs
19 id="defs4">
20 <inkscape:perspective
21 sodipodi:type="inkscape:persp3d"
22 inkscape:vp_x="0 : 526.18109 : 1"
23 inkscape:vp_y="0 : 1000 : 0"
24 inkscape:vp_z="744.09448 : 526.18109 : 1"
25 inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
26 id="perspective10" />
27 <inkscape:perspective
28 id="perspective2841"
29 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
30 inkscape:vp_z="1 : 0.5 : 1"
31 inkscape:vp_y="0 : 1000 : 0"
32 inkscape:vp_x="0 : 0.5 : 1"
33 sodipodi:type="inkscape:persp3d" />
34 <inkscape:perspective
35 id="perspective2858"
36 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
37 inkscape:vp_z="1 : 0.5 : 1"
38 inkscape:vp_y="0 : 1000 : 0"
39 inkscape:vp_x="0 : 0.5 : 1"
40 sodipodi:type="inkscape:persp3d" />
41 <inkscape:perspective
42 id="perspective2872"
43 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
44 inkscape:vp_z="1 : 0.5 : 1"
45 inkscape:vp_y="0 : 1000 : 0"
46 inkscape:vp_x="0 : 0.5 : 1"
47 sodipodi:type="inkscape:persp3d" />
48 <inkscape:perspective
49 id="perspective2968"
50 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
51 inkscape:vp_z="1 : 0.5 : 1"
52 inkscape:vp_y="0 : 1000 : 0"
53 inkscape:vp_x="0 : 0.5 : 1"
54 sodipodi:type="inkscape:persp3d" />
55 <inkscape:perspective
56 id="perspective2996"
57 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
58 inkscape:vp_z="1 : 0.5 : 1"
59 inkscape:vp_y="0 : 1000 : 0"
60 inkscape:vp_x="0 : 0.5 : 1"
61 sodipodi:type="inkscape:persp3d" />
62 <inkscape:perspective
63 id="perspective3840"
64 inkscape:persp3d-origin="512 : 256 : 1"
65 inkscape:vp_z="1024 : 384 : 1"
66 inkscape:vp_y="0 : 1000 : 0"
67 inkscape:vp_x="0 : 384 : 1"
68 sodipodi:type="inkscape:persp3d" />
69 <inkscape:perspective
70 id="perspective3947"
71 inkscape:persp3d-origin="512 : 256 : 1"
72 inkscape:vp_z="1024 : 384 : 1"
73 inkscape:vp_y="0 : 1000 : 0"
74 inkscape:vp_x="0 : 384 : 1"
75 sodipodi:type="inkscape:persp3d" />
76 </defs>
77 <sodipodi:namedview
78 id="base"
79 pagecolor="#ffffff"
80 bordercolor="#666666"
81 borderopacity="1.0"
82 inkscape:pageopacity="0"
83 inkscape:pageshadow="2"
84 inkscape:zoom="30.5625"
85 inkscape:cx="16"
86 inkscape:cy="16"
87 inkscape:document-units="px"
88 inkscape:current-layer="g3950"
89 showgrid="false"
90 inkscape:window-width="1451"
91 inkscape:window-height="975"
92 inkscape:window-x="529"
93 inkscape:window-y="51"
94 inkscape:window-maximized="0" />
95 <metadata
96 id="metadata7">
97 <rdf:RDF>
98 <cc:Work
99 rdf:about="">
100 <dc:format>image/svg+xml</dc:format>
101 <dc:type
102 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
103 <dc:title />
104 </cc:Work>
105 </rdf:RDF>
106 </metadata>
107 <g
108 inkscape:label="Layer 1"
109 inkscape:groupmode="layer"
110 id="layer1"
111 transform="translate(0,-1020.3622)">
112 <g
113 id="g3950"
114 transform="translate(-735.82017,643.9392)"
115 style="fill:#2b0000">
116 <rect
117 id="rect3924"
118 height="8.7959156"
119 width="2.0459805"
120 transform="matrix(0.70690675,-0.70730675,0.70730675,0.70690675,0,0)"
121 y="804.776"
122 x="252.88033"
123 style="fill:#ffffff" />
124 <rect
125 id="rect3926"
126 height="2.0031226"
127 width="8.7665358"
128 transform="matrix(0.70705678,-0.70715678,0.70715678,0.70705678,0,0)"
129 y="808.11853"
130 x="249.69171"
131 style="fill:#ffffff" />
132 </g>
133 </g>
134</svg>
0135
=== modified file 'plugins/unityshell/resources/search_magnify.png'
1Binary 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 differ136Binary 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
=== modified file 'plugins/unityshell/resources/search_spin.png'
2Binary 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 differ137Binary 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
=== added file 'plugins/unityshell/resources/search_spin.svg'
--- plugins/unityshell/resources/search_spin.svg 1970-01-01 00:00:00 +0000
+++ plugins/unityshell/resources/search_spin.svg 2012-03-13 16:31:20 +0000
@@ -0,0 +1,174 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:xlink="http://www.w3.org/1999/xlink"
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 width="32"
14 height="32"
15 id="svg2"
16 version="1.1"
17 inkscape:version="0.47 r22583"
18 sodipodi:docname="search.svg">
19 <defs
20 id="defs4">
21 <linearGradient
22 inkscape:collect="always"
23 id="linearGradient4563">
24 <stop
25 style="stop-color:#ffffff;stop-opacity:1;"
26 offset="0"
27 id="stop4565" />
28 <stop
29 style="stop-color:#ffffff;stop-opacity:0;"
30 offset="1"
31 id="stop4567" />
32 </linearGradient>
33 <inkscape:perspective
34 sodipodi:type="inkscape:persp3d"
35 inkscape:vp_x="0 : 526.18109 : 1"
36 inkscape:vp_y="0 : 1000 : 0"
37 inkscape:vp_z="744.09448 : 526.18109 : 1"
38 inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
39 id="perspective10" />
40 <inkscape:perspective
41 id="perspective2841"
42 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
43 inkscape:vp_z="1 : 0.5 : 1"
44 inkscape:vp_y="0 : 1000 : 0"
45 inkscape:vp_x="0 : 0.5 : 1"
46 sodipodi:type="inkscape:persp3d" />
47 <inkscape:perspective
48 id="perspective2858"
49 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
50 inkscape:vp_z="1 : 0.5 : 1"
51 inkscape:vp_y="0 : 1000 : 0"
52 inkscape:vp_x="0 : 0.5 : 1"
53 sodipodi:type="inkscape:persp3d" />
54 <inkscape:perspective
55 id="perspective2872"
56 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
57 inkscape:vp_z="1 : 0.5 : 1"
58 inkscape:vp_y="0 : 1000 : 0"
59 inkscape:vp_x="0 : 0.5 : 1"
60 sodipodi:type="inkscape:persp3d" />
61 <inkscape:perspective
62 id="perspective2968"
63 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
64 inkscape:vp_z="1 : 0.5 : 1"
65 inkscape:vp_y="0 : 1000 : 0"
66 inkscape:vp_x="0 : 0.5 : 1"
67 sodipodi:type="inkscape:persp3d" />
68 <inkscape:perspective
69 id="perspective2996"
70 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
71 inkscape:vp_z="1 : 0.5 : 1"
72 inkscape:vp_y="0 : 1000 : 0"
73 inkscape:vp_x="0 : 0.5 : 1"
74 sodipodi:type="inkscape:persp3d" />
75 <inkscape:perspective
76 id="perspective3840"
77 inkscape:persp3d-origin="512 : 256 : 1"
78 inkscape:vp_z="1024 : 384 : 1"
79 inkscape:vp_y="0 : 1000 : 0"
80 inkscape:vp_x="0 : 384 : 1"
81 sodipodi:type="inkscape:persp3d" />
82 <inkscape:perspective
83 id="perspective3947"
84 inkscape:persp3d-origin="512 : 256 : 1"
85 inkscape:vp_z="1024 : 384 : 1"
86 inkscape:vp_y="0 : 1000 : 0"
87 inkscape:vp_x="0 : 384 : 1"
88 sodipodi:type="inkscape:persp3d" />
89 <linearGradient
90 inkscape:collect="always"
91 xlink:href="#linearGradient4563"
92 id="linearGradient4569"
93 x1="751.82017"
94 y1="396.923"
95 x2="754.34198"
96 y2="394.51682"
97 gradientUnits="userSpaceOnUse" />
98 </defs>
99 <sodipodi:namedview
100 id="base"
101 pagecolor="#ffffff"
102 bordercolor="#666666"
103 borderopacity="1.0"
104 inkscape:pageopacity="0"
105 inkscape:pageshadow="2"
106 inkscape:zoom="21.610951"
107 inkscape:cx="19.076277"
108 inkscape:cy="14.90749"
109 inkscape:document-units="px"
110 inkscape:current-layer="g3950"
111 showgrid="false"
112 inkscape:window-width="1451"
113 inkscape:window-height="975"
114 inkscape:window-x="98"
115 inkscape:window-y="155"
116 inkscape:window-maximized="0" />
117 <metadata
118 id="metadata7">
119 <rdf:RDF>
120 <cc:Work
121 rdf:about="">
122 <dc:format>image/svg+xml</dc:format>
123 <dc:type
124 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
125 <dc:title></dc:title>
126 </cc:Work>
127 </rdf:RDF>
128 </metadata>
129 <g
130 inkscape:label="Layer 1"
131 inkscape:groupmode="layer"
132 id="layer1"
133 transform="translate(0,-1020.3622)">
134 <g
135 id="g3950"
136 transform="translate(-735.82017,643.9392)"
137 style="fill:#2b0000">
138 <g
139 id="g3928"
140 style="fill:#ffffff">
141
142 <path
143 id="path3932"
144 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"
145 style="fill:#ffffff" />
146
147 <linearGradient
148 y2="391.6506"
149 x2="753.69513"
150 y1="402.29791"
151 x1="747.54791"
152 gradientUnits="userSpaceOnUse"
153 id="SVGID_1_">
154 <stop
155 id="stop3935"
156 style="stop-color:#FFFFFF"
157 offset="0.1411" />
158
159 <stop
160 id="stop3937"
161 style="stop-color:#FFFFFF;stop-opacity:0"
162 offset="0.7423" />
163
164 </linearGradient>
165
166 <path
167 id="path3939"
168 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"
169 style="fill:url(#linearGradient4569);fill-opacity:1" />
170
171</g>
172 </g>
173 </g>
174</svg>
0175
=== modified file 'plugins/unityshell/src/DashStyle.cpp'
--- plugins/unityshell/src/DashStyle.cpp 2012-02-24 15:19:35 +0000
+++ plugins/unityshell/src/DashStyle.cpp 2012-03-13 16:31:20 +0000
@@ -88,12 +88,13 @@
88class LazyLoadTexture88class LazyLoadTexture
89{89{
90public:90public:
91 LazyLoadTexture(std::string const& filename);91 LazyLoadTexture(std::string const& filename, int size = -1);
92 nux::BaseTexture* texture();92 nux::BaseTexture* texture();
93private:93private:
94 void LoadTexture();94 void LoadTexture();
95private:95private:
96 std::string filename_;96 std::string filename_;
97 int size_;
97 BaseTexturePtr texture_;98 BaseTexturePtr texture_;
98};99};
99100
@@ -120,7 +121,7 @@
120 nux::Color const& color,121 nux::Color const& color,
121 std::string const& label,122 std::string const& label,
122 int font_size = -1,123 int font_size = -1,
123 double horizMargin = 10.0,124 double horizMargin = 4.0,
124 Alignment alignment = Alignment::CENTER);125 Alignment alignment = Alignment::CENTER);
125126
126 void ButtonOutlinePath(cairo_t* cr, bool align);127 void ButtonOutlinePath(cairo_t* cr, bool align);
@@ -205,6 +206,7 @@
205 LazyLoadTexture dash_shine_;206 LazyLoadTexture dash_shine_;
206207
207 LazyLoadTexture search_magnify_texture_;208 LazyLoadTexture search_magnify_texture_;
209 LazyLoadTexture search_circle_texture_;
208 LazyLoadTexture search_close_texture_;210 LazyLoadTexture search_close_texture_;
209 LazyLoadTexture search_spin_texture_;211 LazyLoadTexture search_spin_texture_;
210212
@@ -240,8 +242,9 @@
240 , dash_top_tile_("/dash_top_tile.png")242 , dash_top_tile_("/dash_top_tile.png")
241 , dash_shine_("/dash_sheen.png")243 , dash_shine_("/dash_sheen.png")
242 , search_magnify_texture_("/search_magnify.png")244 , search_magnify_texture_("/search_magnify.png")
243 , search_close_texture_("/search_close.png")245 , search_circle_texture_("/search_circle.svg", 32)
244 , search_spin_texture_("/search_spin.png")246 , search_close_texture_("/search_close.svg", 32)
247 , search_spin_texture_("/search_spin.svg", 32)
245 , group_unexpand_texture_("/dash_group_unexpand.png")248 , group_unexpand_texture_("/dash_group_unexpand.png")
246 , group_expand_texture_("/dash_group_expand.png")249 , group_expand_texture_("/dash_group_expand.png")
247 , star_deselected_texture_("/star_deselected.png")250 , star_deselected_texture_("/star_deselected.png")
@@ -1559,7 +1562,7 @@
1559 pimpl->button_label_text_color_[state],1562 pimpl->button_label_text_color_[state],
1560 label,1563 label,
1561 font_size,1564 font_size,
1562 10.0,1565 11.0, // 15px = 11pt
1563 alignment);1566 alignment);
15641567
1565 return true;1568 return true;
@@ -1814,7 +1817,7 @@
1814 pimpl->Text(cr,1817 pimpl->Text(cr,
1815 pimpl->button_label_text_color_[state],1818 pimpl->button_label_text_color_[state],
1816 label,1819 label,
1817 1.0);1820 10); // 13px = 10pt
18181821
1819 return true;1822 return true;
1820}1823}
@@ -2105,6 +2108,11 @@
2105 return pimpl->search_magnify_texture_.texture();2108 return pimpl->search_magnify_texture_.texture();
2106}2109}
21072110
2111nux::BaseTexture* Style::GetSearchCircleIcon()
2112{
2113 return pimpl->search_circle_texture_.texture();
2114}
2115
2108nux::BaseTexture* Style::GetSearchCloseIcon()2116nux::BaseTexture* Style::GetSearchCloseIcon()
2109{2117{
2110 return pimpl->search_close_texture_.texture();2118 return pimpl->search_close_texture_.texture();
@@ -2149,8 +2157,9 @@
2149namespace2157namespace
2150{2158{
21512159
2152LazyLoadTexture::LazyLoadTexture(std::string const& filename)2160LazyLoadTexture::LazyLoadTexture(std::string const& filename, int size)
2153 : filename_(filename)2161 : filename_(filename)
2162 , size_(size)
2154{2163{
2155}2164}
21562165
@@ -2167,7 +2176,7 @@
2167 glib::Object<GdkPixbuf> pixbuf;2176 glib::Object<GdkPixbuf> pixbuf;
2168 glib::Error error;2177 glib::Error error;
21692178
2170 pixbuf = ::gdk_pixbuf_new_from_file(full_path.c_str(), &error);2179 pixbuf = ::gdk_pixbuf_new_from_file_at_size(full_path.c_str(), size_, size_, &error);
2171 if (error)2180 if (error)
2172 {2181 {
2173 LOG_WARN(logger) << "Unable to texture " << full_path << ": " << error;2182 LOG_WARN(logger) << "Unable to texture " << full_path << ": " << error;
21742183
=== modified file 'plugins/unityshell/src/DashStyle.h'
--- plugins/unityshell/src/DashStyle.h 2012-02-24 15:19:35 +0000
+++ plugins/unityshell/src/DashStyle.h 2012-03-13 16:31:20 +0000
@@ -178,6 +178,7 @@
178 nux::BaseTexture* GetDashShine();178 nux::BaseTexture* GetDashShine();
179179
180 nux::BaseTexture* GetSearchMagnifyIcon();180 nux::BaseTexture* GetSearchMagnifyIcon();
181 nux::BaseTexture* GetSearchCircleIcon();
181 nux::BaseTexture* GetSearchCloseIcon();182 nux::BaseTexture* GetSearchCloseIcon();
182 nux::BaseTexture* GetSearchSpinIcon();183 nux::BaseTexture* GetSearchSpinIcon();
183184
184185
=== modified file 'plugins/unityshell/src/FilterExpanderLabel.cpp'
--- plugins/unityshell/src/FilterExpanderLabel.cpp 2012-02-21 01:16:53 +0000
+++ plugins/unityshell/src/FilterExpanderLabel.cpp 2012-03-13 16:31:20 +0000
@@ -47,6 +47,9 @@
47const int HIGHLIGHT_HEIGHT = 34;47const int HIGHLIGHT_HEIGHT = 34;
48const int HIGHLIGHT_WIDTH_SUBTRACTOR = 5;48const int HIGHLIGHT_WIDTH_SUBTRACTOR = 5;
4949
50// font
51const char* const FONT_EXPANDER_LABEL = "Ubuntu Bold 13"; // 17px = 13
52
50class ExpanderView : public nux::View53class ExpanderView : public nux::View
51{54{
52public:55public:
@@ -102,7 +105,7 @@
102 , right_hand_contents_(nullptr)105 , right_hand_contents_(nullptr)
103 , cairo_label_(nullptr)106 , cairo_label_(nullptr)
104 , raw_label_(label)107 , raw_label_(label)
105 , label_("<span size='larger' weight='bold'>" + label + "</span>")108 , label_("label")
106{109{
107 expanded.changed.connect(sigc::mem_fun(this, &FilterExpanderLabel::DoExpandChange));110 expanded.changed.connect(sigc::mem_fun(this, &FilterExpanderLabel::DoExpandChange));
108 BuildLayout();111 BuildLayout();
@@ -118,10 +121,7 @@
118{121{
119 raw_label_ = label;122 raw_label_ = label;
120123
121 label_ = "<span size='larger' weight='bold'>";124 cairo_label_->SetText(label.c_str());
122 label_ += raw_label_;
123 label_ += "</span>";
124 cairo_label_->SetText(label_.c_str());
125}125}
126126
127void FilterExpanderLabel::SetRightHandView(nux::View* view)127void FilterExpanderLabel::SetRightHandView(nux::View* view)
@@ -159,10 +159,10 @@
159 expander_view_->SetLayout(expander_layout_);159 expander_view_->SetLayout(expander_layout_);
160 top_bar_layout_->AddView(expander_view_, 0);160 top_bar_layout_->AddView(expander_view_, 0);
161161
162 cairo_label_ = new nux::StaticText(label_.c_str(), NUX_TRACKER_LOCATION);162 cairo_label_ = new nux::StaticCairoText(label_.c_str(), NUX_TRACKER_LOCATION);
163 cairo_label_->SetFontName("Ubuntu 10");163 cairo_label_->SetFont(FONT_EXPANDER_LABEL);
164 cairo_label_->SetTextColor(nux::color::White);164 cairo_label_->SetTextColor(nux::color::White);
165 cairo_label_->SetAcceptKeyNavFocusOnMouseDown(false);165 cairo_label_->SetAcceptKeyboardEvent(false);
166166
167 nux::BaseTexture* arrow;167 nux::BaseTexture* arrow;
168 arrow = dash::Style::Instance().GetGroupUnexpandIcon();168 arrow = dash::Style::Instance().GetGroupUnexpandIcon();
169169
=== modified file 'plugins/unityshell/src/FilterExpanderLabel.h'
--- plugins/unityshell/src/FilterExpanderLabel.h 2012-02-21 00:11:20 +0000
+++ plugins/unityshell/src/FilterExpanderLabel.h 2012-03-13 16:31:20 +0000
@@ -30,11 +30,11 @@
30#include <Nux/HLayout.h>30#include <Nux/HLayout.h>
31#include <Nux/View.h>31#include <Nux/View.h>
32#include <Nux/VLayout.h>32#include <Nux/VLayout.h>
33#include <Nux/StaticText.h>
34#include <UnityCore/Filter.h>33#include <UnityCore/Filter.h>
3534
36#include "IconTexture.h"35#include "IconTexture.h"
37#include "Introspectable.h"36#include "Introspectable.h"
37#include "StaticCairoText.h"
3838
39namespace nux39namespace nux
40{40{
@@ -81,7 +81,7 @@
81 nux::View* expander_view_;81 nux::View* expander_view_;
82 nux::LinearLayout* expander_layout_;82 nux::LinearLayout* expander_layout_;
83 nux::View* right_hand_contents_;83 nux::View* right_hand_contents_;
84 nux::StaticText* cairo_label_;84 nux::StaticCairoText* cairo_label_;
85 std::string raw_label_;85 std::string raw_label_;
86 std::string label_;86 std::string label_;
87 nux::VLayout* arrow_layout_;87 nux::VLayout* arrow_layout_;
8888
=== modified file 'plugins/unityshell/src/FilterMultiRangeButton.cpp'
--- plugins/unityshell/src/FilterMultiRangeButton.cpp 2012-02-17 16:48:25 +0000
+++ plugins/unityshell/src/FilterMultiRangeButton.cpp 2012-03-13 16:31:20 +0000
@@ -158,12 +158,10 @@
158 MultiRangeSide faked_side)158 MultiRangeSide faked_side)
159{159{
160 std::string name("10");160 std::string name("10");
161 std::stringstream final;
162161
163 if (filter_)162 if (filter_)
164 {163 {
165 name = filter_->name;164 name = filter_->name;
166 final << "<small>" << name << "</small>";
167 }165 }
168166
169 Arrow arrow;167 Arrow arrow;
@@ -184,7 +182,7 @@
184 else182 else
185 segment = Segment::RIGHT;183 segment = Segment::RIGHT;
186184
187 Style::Instance().MultiRangeSegment(cr, faked_state, final.str(), arrow, segment);185 Style::Instance().MultiRangeSegment(cr, faked_state, name, arrow, segment);
188 NeedRedraw();186 NeedRedraw();
189}187}
190188
191189
=== modified file 'plugins/unityshell/src/PlacesGroup.cpp'
--- plugins/unityshell/src/PlacesGroup.cpp 2012-03-13 07:31:25 +0000
+++ plugins/unityshell/src/PlacesGroup.cpp 2012-03-13 16:31:20 +0000
@@ -50,10 +50,8 @@
50namespace50namespace
51{51{
5252
53const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 1.0f);53const nux::Color kExpandDefaultTextColor(1.0f, 1.0f, 1.0f, 0.5f);
54const nux::Color kExpandHoverTextColor(1.0f, 1.0f, 1.0f, 1.0f);54const float kExpandDefaultIconOpacity = 0.5f;
55const float kExpandDefaultIconOpacity = 1.0f;
56const float kExpandHoverIconOpacity = 1.0f;
5755
58// Category highlight56// Category highlight
59const int kHighlightHeight = 24;57const int kHighlightHeight = 24;
@@ -64,6 +62,10 @@
64const int kSeparatorLeftPadding = 16;62const int kSeparatorLeftPadding = 16;
65const int kSeparatorWidthSubtractor = 10;63const int kSeparatorWidthSubtractor = 10;
6664
65// Font
66const char* const NAME_LABEL_FONT = "Ubuntu 13"; // 17px = 13
67const char* const EXPANDER_LABEL_FONT = "Ubuntu 10"; // 13px = 10
68
67class HeaderView : public nux::View69class HeaderView : public nux::View
68{70{
69public:71public:
@@ -142,6 +144,7 @@
142 _header_layout->AddLayout(_text_layout, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);144 _header_layout->AddLayout(_text_layout, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
143145
144 _name = new nux::StaticCairoText("", NUX_TRACKER_LOCATION);146 _name = new nux::StaticCairoText("", NUX_TRACKER_LOCATION);
147 _name->SetFont(NAME_LABEL_FONT);
145 _name->SetTextEllipsize(nux::StaticCairoText::NUX_ELLIPSIZE_END);148 _name->SetTextEllipsize(nux::StaticCairoText::NUX_ELLIPSIZE_END);
146 _name->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);149 _name->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);
147 _text_layout->AddView(_name, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);150 _text_layout->AddView(_name, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
@@ -150,12 +153,15 @@
150 _expand_layout->SetHorizontalInternalMargin(8);153 _expand_layout->SetHorizontalInternalMargin(8);
151 _text_layout->AddLayout(_expand_layout, 0, nux::MINOR_POSITION_END, nux::MINOR_SIZE_MATCHCONTENT);154 _text_layout->AddLayout(_expand_layout, 0, nux::MINOR_POSITION_END, nux::MINOR_SIZE_MATCHCONTENT);
152155
156 _expand_label_layout = new nux::HLayout(NUX_TRACKER_LOCATION);
157 _expand_layout->AddLayout(_expand_label_layout, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
158
153 _expand_label = new nux::StaticCairoText("", NUX_TRACKER_LOCATION);159 _expand_label = new nux::StaticCairoText("", NUX_TRACKER_LOCATION);
160 _expand_label->SetFont(EXPANDER_LABEL_FONT);
154 _expand_label->SetTextEllipsize(nux::StaticCairoText::NUX_ELLIPSIZE_END);161 _expand_label->SetTextEllipsize(nux::StaticCairoText::NUX_ELLIPSIZE_END);
155 _expand_label->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);162 _expand_label->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);
156 _expand_label->SetTextColor(kExpandDefaultTextColor);163 _expand_label->SetTextColor(kExpandDefaultTextColor);
157164 _expand_label_layout->AddView(_expand_label, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
158 _expand_layout->AddView(_expand_label, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
159165
160 _expand_icon = new IconTexture(arrow, arrow->GetWidth(), arrow->GetHeight());166 _expand_icon = new IconTexture(arrow, arrow->GetWidth(), arrow->GetHeight());
161 _expand_icon->SetOpacity(kExpandDefaultIconOpacity);167 _expand_icon->SetOpacity(kExpandDefaultIconOpacity);
@@ -278,9 +284,7 @@
278void284void
279PlacesGroup::RefreshLabel()285PlacesGroup::RefreshLabel()
280{286{
281 const char* temp = "<span size='small'>%s</span>";
282 char* result_string;287 char* result_string;
283 char* final;
284288
285 if (_n_visible_items_in_unexpand_mode >= _n_total_items)289 if (_n_visible_items_in_unexpand_mode >= _n_total_items)
286 {290 {
@@ -305,9 +309,8 @@
305 SetName(tmpname);309 SetName(tmpname);
306 g_free(tmpname);310 g_free(tmpname);
307311
308 final = g_strdup_printf(temp, result_string);
309312
310 _expand_label->SetText(final);313 _expand_label->SetText(result_string);
311 _expand_label->SetVisible(_n_visible_items_in_unexpand_mode < _n_total_items);314 _expand_label->SetVisible(_n_visible_items_in_unexpand_mode < _n_total_items);
312315
313 // See bug #748101 ("Dash - "See more..." line should be base-aligned with section header")316 // See bug #748101 ("Dash - "See more..." line should be base-aligned with section header")
@@ -317,12 +320,11 @@
317 int bottom_padding = _name->GetBaseHeight() - _name->GetBaseline() -320 int bottom_padding = _name->GetBaseHeight() - _name->GetBaseline() -
318 (_expand_label->GetBaseHeight() - _expand_label->GetBaseline());321 (_expand_label->GetBaseHeight() - _expand_label->GetBaseline());
319322
320 _expand_layout->SetTopAndBottomPadding(0, bottom_padding);323 _expand_label_layout->SetTopAndBottomPadding(0, bottom_padding);
321324
322 QueueDraw();325 QueueDraw();
323326
324 g_free((result_string));327 g_free(result_string);
325 g_free(final);
326}328}
327329
328void330void
329331
=== modified file 'plugins/unityshell/src/PlacesGroup.h'
--- plugins/unityshell/src/PlacesGroup.h 2012-03-09 21:36:35 +0000
+++ plugins/unityshell/src/PlacesGroup.h 2012-03-13 16:31:20 +0000
@@ -105,6 +105,7 @@
105 nux::View* _header_view;105 nux::View* _header_view;
106 nux::HLayout* _header_layout;106 nux::HLayout* _header_layout;
107 nux::HLayout* _text_layout;107 nux::HLayout* _text_layout;
108 nux::HLayout* _expand_label_layout;
108 nux::HLayout* _expand_layout;109 nux::HLayout* _expand_layout;
109 nux::View* _child_view;110 nux::View* _child_view;
110 nux::AbstractPaintLayer* _focus_layer;111 nux::AbstractPaintLayer* _focus_layer;
111112
=== modified file 'plugins/unityshell/src/ResultRendererTile.cpp'
--- plugins/unityshell/src/ResultRendererTile.cpp 2011-10-03 23:21:55 +0000
+++ plugins/unityshell/src/ResultRendererTile.cpp 2012-03-13 16:31:20 +0000
@@ -51,6 +51,9 @@
51namespace51namespace
52{52{
53nux::logging::Logger logger("unity.dash.results");53nux::logging::Logger logger("unity.dash.results");
54
55const int FONT_SIZE = 10;
56
54}57}
5558
56namespace dash59namespace dash
@@ -423,7 +426,7 @@
423 cairo_set_font_options(cr, gdk_screen_get_font_options(screen));426 cairo_set_font_options(cr, gdk_screen_get_font_options(screen));
424 layout = pango_cairo_create_layout(cr);427 layout = pango_cairo_create_layout(cr);
425 desc = pango_font_description_from_string(font.Value());428 desc = pango_font_description_from_string(font.Value());
426 pango_font_description_set_size (desc, 9 * PANGO_SCALE);429 pango_font_description_set_size (desc, FONT_SIZE * PANGO_SCALE);
427430
428 pango_layout_set_font_description(layout, desc);431 pango_layout_set_font_description(layout, desc);
429 pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);432 pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
430433
=== modified file 'plugins/unityshell/src/SearchBar.cpp'
--- plugins/unityshell/src/SearchBar.cpp 2012-02-23 21:48:26 +0000
+++ plugins/unityshell/src/SearchBar.cpp 2012-03-13 16:31:20 +0000
@@ -51,11 +51,29 @@
51const int LIVE_SEARCH_TIMEOUT = 40;51const int LIVE_SEARCH_TIMEOUT = 40;
52const int SPINNER_TIMEOUT = 100;52const int SPINNER_TIMEOUT = 100;
5353
54const int SPINNER_HEIGHT = 48; // To don't break the current layout, let's use a fixed height for the spinner.
55const int SPACE_BETWEEN_SPINNER_AND_TEXT = 4;
56const int LEFT_INTERNAL_PADDING = 9;
57
58
54// Highlight59// Highlight
55const int HIGHLIGHT_HEIGHT = 24;60const int HIGHLIGHT_HEIGHT = 24;
56const int HIGHLIGHT_WIDTH = 292;61const int HIGHLIGHT_WIDTH = 292;
57const int HIGHLIGHT_LEFT_PADDING = 5;62const int HIGHLIGHT_LEFT_PADDING = 5;
58const int HIGHLIGHT_RIGHT_PADDING = 4;63const int HIGHLIGHT_RIGHT_PADDING = 4;
64
65// Fonts
66const std::string HINT_LABEL_FONT_SIZE = "20px";
67const std::string HINT_LABEL_FONT_STYLE = "Italic";
68const std::string HINT_LABEL_DEFAULT_FONT = "Ubuntu " + HINT_LABEL_FONT_STYLE + " " + HINT_LABEL_FONT_SIZE;
69
70const std::string PANGO_ENTRY_DEFAULT_FONT_FAMILY = "Ubuntu";
71const int PANGO_ENTRY_FONT_SIZE = 22;
72
73const std::string SHOW_FILTERS_LABEL_FONT_SIZE = "13";
74const std::string SHOW_FILTERS_LABEL_FONT_STYLE = "Bold";
75const std::string SHOW_FILTERS_LABEL_DEFAULT_FONT = "Ubuntu " + SHOW_FILTERS_LABEL_FONT_STYLE + " " + SHOW_FILTERS_LABEL_FONT_SIZE;
76
59}77}
6078
61namespace79namespace
@@ -160,21 +178,28 @@
160 bg_layer_ = new nux::ColorLayer(nux::Color(0xff595853), true);178 bg_layer_ = new nux::ColorLayer(nux::Color(0xff595853), true);
161179
162 layout_ = new nux::HLayout(NUX_TRACKER_LOCATION);180 layout_ = new nux::HLayout(NUX_TRACKER_LOCATION);
163 layout_->SetHorizontalInternalMargin(0);181 layout_->SetHorizontalInternalMargin(SPACE_BETWEEN_SPINNER_AND_TEXT);
164 layout_->SetVerticalExternalMargin(external_margin_vertical);182 layout_->SetTopAndBottomPadding(external_margin_vertical);
165 layout_->SetHorizontalExternalMargin(external_margin_horizontal);183 layout_->SetLeftAndRightPadding(external_margin_horizontal + LEFT_INTERNAL_PADDING, external_margin_horizontal);
166 SetLayout(layout_);184 SetLayout(layout_);
167185
168 spinner_ = new SearchBarSpinner();186 spinner_ = new SearchBarSpinner();
169 spinner_->SetMinMaxSize(icon->GetWidth(), icon->GetHeight());187 spinner_->SetMinimumHeight(SPINNER_HEIGHT);
188 spinner_->SetMaximumHeight(SPINNER_HEIGHT);
170 spinner_->mouse_click.connect(sigc::mem_fun(this, &SearchBar::OnClearClicked));189 spinner_->mouse_click.connect(sigc::mem_fun(this, &SearchBar::OnClearClicked));
171 layout_->AddView(spinner_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);190 layout_->AddView(spinner_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
172191
192 nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION);
193
173 hint_ = new nux::StaticCairoText(" ");194 hint_ = new nux::StaticCairoText(" ");
174 hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f));195 hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f));
175 hint_->SetMaximumWidth(search_bar_width_ - icon->GetWidth());196 hint_->SetMaximumWidth(search_bar_width_ - icon->GetWidth());
197 hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str());
198 hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
176199
177 pango_entry_ = new IMTextEntry();200 pango_entry_ = new IMTextEntry();
201 pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str());
202 pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE);
178 pango_entry_->text_changed.connect(sigc::mem_fun(this, &SearchBar::OnSearchChanged));203 pango_entry_->text_changed.connect(sigc::mem_fun(this, &SearchBar::OnSearchChanged));
179 pango_entry_->activated.connect([&]() { activated.emit(); });204 pango_entry_->activated.connect([&]() { activated.emit(); });
180 pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });205 pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });
@@ -183,7 +208,7 @@
183 pango_entry_->SetMaximumWidth(search_bar_width_ - 1.5 * icon->GetWidth());208 pango_entry_->SetMaximumWidth(search_bar_width_ - 1.5 * icon->GetWidth());
184209
185 layered_layout_ = new nux::LayeredLayout();210 layered_layout_ = new nux::LayeredLayout();
186 layered_layout_->AddLayer(hint_);211 layered_layout_->AddLayout(hint_layout);
187 layered_layout_->AddLayer(pango_entry_);212 layered_layout_->AddLayer(pango_entry_);
188 layered_layout_->SetPaintAll(true);213 layered_layout_->SetPaintAll(true);
189 layered_layout_->SetActiveLayerN(1);214 layered_layout_->SetActiveLayerN(1);
@@ -193,11 +218,11 @@
193218
194 if (show_filter_hint_)219 if (show_filter_hint_)
195 {220 {
196 std::string filter_str(_("<small><b>Filter results</b></small>"));221 std::string filter_str(_("Filter results"));
197 show_filters_ = new nux::StaticCairoText(filter_str.c_str());222 show_filters_ = new nux::StaticCairoText(filter_str.c_str());
198 show_filters_->SetVisible(false);223 show_filters_->SetVisible(false);
199 show_filters_->SetFont("Ubuntu 10");224 show_filters_->SetFont(SHOW_FILTERS_LABEL_DEFAULT_FONT.c_str());
200 show_filters_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 1.0f));225 show_filters_->SetTextColor(nux::color::White);
201 show_filters_->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);226 show_filters_->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_LEFT);
202227
203 nux::BaseTexture* arrow;228 nux::BaseTexture* arrow;
@@ -298,44 +323,35 @@
298323
299void SearchBar::OnFontChanged(GtkSettings* settings, GParamSpec* pspec)324void SearchBar::OnFontChanged(GtkSettings* settings, GParamSpec* pspec)
300{325{
301 static const int HOW_LARGE = 8;
302 gchar* font_name = NULL;326 gchar* font_name = NULL;
303 PangoFontDescription* desc;327 PangoFontDescription* desc;
304 gint size;328 std::ostringstream font_desc;
305 gchar* font_desc;
306329
307 g_object_get(settings, "gtk-font-name", &font_name, NULL);330 g_object_get(settings, "gtk-font-name", &font_name, NULL);
308331
309 desc = pango_font_description_from_string(font_name);332 desc = pango_font_description_from_string(font_name);
310 pango_entry_->SetFontFamily(pango_font_description_get_family(desc));333 pango_entry_->SetFontFamily(pango_font_description_get_family(desc));
311334 pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE);
312 size = pango_font_description_get_size(desc);
313 size /= pango_font_description_get_size_is_absolute(desc) ? 1 : PANGO_SCALE;
314 pango_entry_->SetFontSize(size + HOW_LARGE);
315
316 pango_entry_->SetFontOptions(gdk_screen_get_font_options(gdk_screen_get_default()));335 pango_entry_->SetFontOptions(gdk_screen_get_font_options(gdk_screen_get_default()));
317336
318 font_desc = g_strdup_printf("%s %d", pango_font_description_get_family(desc), size + HOW_LARGE);337 font_desc << pango_font_description_get_family(desc) << " " << HINT_LABEL_FONT_STYLE << " " << HINT_LABEL_FONT_SIZE;
319 hint_->SetFont(font_desc);338 hint_->SetFont(font_desc.str().c_str());
320339
321 g_free(font_desc);340 font_desc.str("");
322 font_desc = g_strdup_printf("%s %d", pango_font_description_get_family(desc), size + HOW_LARGE/2);341 font_desc.clear();
323 show_filters_->SetFont(font_desc);342 font_desc << pango_font_description_get_family(desc) << " " << SHOW_FILTERS_LABEL_FONT_STYLE << " " << SHOW_FILTERS_LABEL_FONT_SIZE;
343 show_filters_->SetFont(font_desc.str().c_str());
324344
325 pango_font_description_free(desc);345 pango_font_description_free(desc);
326 g_free(font_name);346 g_free(font_name);
327 g_free(font_desc);
328}347}
329348
330void SearchBar::OnSearchHintChanged()349void SearchBar::OnSearchHintChanged()
331{350{
332 std::string hint = search_hint;351 gchar* tmp = g_markup_escape_text(search_hint().c_str(), -1);
333 gchar* tmp = g_markup_escape_text(hint.c_str(), -1);352
334353 hint_->SetText(tmp);
335 gchar* markup = g_strdup_printf("<span font_size='small' font_style='italic'> %s </span>", tmp);354
336 hint_->SetText(markup);
337
338 g_free(markup);
339 g_free(tmp);355 g_free(tmp);
340}356}
341357
@@ -583,14 +599,15 @@
583599
584void SearchBar::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key)600void SearchBar::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key)
585{601{
586 search_hint = "";602 hint_->SetVisible(false);
587}603}
588604
589void SearchBar::OnEndKeyFocus()605void SearchBar::OnEndKeyFocus()
590{606{
591 search_hint = _("Search");607 hint_->SetVisible(search_string().empty());
592}608}
593609
610
594nux::TextEntry* SearchBar::text_entry() const611nux::TextEntry* SearchBar::text_entry() const
595{612{
596 return pango_entry_;613 return pango_entry_;
597614
=== modified file 'plugins/unityshell/src/SearchBarSpinner.cpp'
--- plugins/unityshell/src/SearchBarSpinner.cpp 2012-03-01 01:47:18 +0000
+++ plugins/unityshell/src/SearchBarSpinner.cpp 2012-03-13 16:31:20 +0000
@@ -39,6 +39,7 @@
39 dash::Style& style = dash::Style::Instance();39 dash::Style& style = dash::Style::Instance();
4040
41 _magnify = style.GetSearchMagnifyIcon();41 _magnify = style.GetSearchMagnifyIcon();
42 _circle = style.GetSearchCircleIcon();
42 _close = style.GetSearchCloseIcon();43 _close = style.GetSearchCloseIcon();
43 _spin = style.GetSearchSpinIcon();44 _spin = style.GetSearchSpinIcon();
4445
@@ -112,24 +113,13 @@
112 }113 }
113 else114 else
114 {115 {
115 texxform.FlipVCoord(true);116 GfxContext.QRP_1Tex(geo.x + ((geo.width - _circle->GetWidth()) / 2),
116 GfxContext.QRP_1Tex(geo.x + ((geo.width - _spin->GetWidth()) / 2),117 geo.y + ((geo.height - _circle->GetHeight()) / 2),
117 geo.y + ((geo.height - _spin->GetHeight()) / 2),118 _circle->GetWidth(),
118 _spin->GetWidth(),119 _circle->GetHeight(),
119 _spin->GetHeight(),120 _circle->GetDeviceTexture(),
120 _spin->GetDeviceTexture(),121 texxform,
121 texxform,122 nux::color::White);
122 nux::color::White);
123 texxform.FlipVCoord(false);
124
125 GfxContext.QRP_1Tex(geo.x + ((geo.width - _spin->GetWidth()) / 2),
126 geo.y + ((geo.height - _spin->GetHeight()) / 2),
127 _spin->GetWidth(),
128 _spin->GetHeight(),
129 _spin->GetDeviceTexture(),
130 texxform,
131 nux::color::White);
132
133123
134 GfxContext.QRP_1Tex(geo.x + ((geo.width - _close->GetWidth()) / 2),124 GfxContext.QRP_1Tex(geo.x + ((geo.width - _close->GetWidth()) / 2),
135 geo.y + ((geo.height - _close->GetHeight()) / 2),125 geo.y + ((geo.height - _close->GetHeight()) / 2),
136126
=== modified file 'plugins/unityshell/src/SearchBarSpinner.h'
--- plugins/unityshell/src/SearchBarSpinner.h 2012-02-07 07:42:12 +0000
+++ plugins/unityshell/src/SearchBarSpinner.h 2012-03-13 16:31:20 +0000
@@ -65,10 +65,9 @@
65 SpinnerState _state;65 SpinnerState _state;
6666
67 nux::BaseTexture* _magnify;67 nux::BaseTexture* _magnify;
68 nux::BaseTexture* _circle;
68 nux::BaseTexture* _close;69 nux::BaseTexture* _close;
69 nux::BaseTexture* _close_glow;
70 nux::BaseTexture* _spin;70 nux::BaseTexture* _spin;
71 nux::BaseTexture* _spin_glow;
7271
73 nux::Matrix4 _2d_rotate;72 nux::Matrix4 _2d_rotate;
74 float _rotation;73 float _rotation;
7574
=== modified file 'plugins/unityshell/src/StaticCairoText.cpp'
--- plugins/unityshell/src/StaticCairoText.cpp 2012-02-29 09:59:09 +0000
+++ plugins/unityshell/src/StaticCairoText.cpp 2012-03-13 16:31:20 +0000
@@ -308,6 +308,7 @@
308 PangoLayout* layout = NULL;308 PangoLayout* layout = NULL;
309 PangoFontDescription* desc = NULL;309 PangoFontDescription* desc = NULL;
310 PangoContext* pangoCtx = NULL;310 PangoContext* pangoCtx = NULL;
311 PangoRectangle inkRect = {0, 0, 0, 0};
311 PangoRectangle logRect = {0, 0, 0, 0};312 PangoRectangle logRect = {0, 0, 0, 0};
312 int dpi = 0;313 int dpi = 0;
313 GdkScreen* screen = gdk_screen_get_default(); // is not ref'ed314 GdkScreen* screen = gdk_screen_get_default(); // is not ref'ed
@@ -370,9 +371,14 @@
370 (float) dpi / (float) PANGO_SCALE);371 (float) dpi / (float) PANGO_SCALE);
371 }372 }
372 pango_layout_context_changed(layout);373 pango_layout_context_changed(layout);
373 pango_layout_get_extents(layout, NULL, &logRect);374 pango_layout_get_extents(layout, &inkRect, &logRect);
374375
375 width = logRect.width / PANGO_SCALE;376 // logRect has some issues using italic style
377 if (inkRect.x + inkRect.width > logRect.x + logRect.width)
378 width = (inkRect.x + inkRect.width - logRect.x) /PANGO_SCALE;
379 else
380 width = logRect.width / PANGO_SCALE;
381
376 height = logRect.height / PANGO_SCALE;382 height = logRect.height / PANGO_SCALE;
377 _cached_extent_height = height;383 _cached_extent_height = height;
378 _cached_extent_width = width;384 _cached_extent_width = width;