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