Merge lp:~vanvugt/unity/fix-761465-unity3.0 into lp:unity/3.0

Proposed by Daniel van Vugt
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 1208
Proposed branch: lp:~vanvugt/unity/fix-761465-unity3.0
Merge into: lp:unity/3.0
Diff against target: 39 lines (+6/-4)
2 files modified
src/PlacesSimpleTile.cpp (+5/-4)
src/PlacesSimpleTile.h (+1/-0)
To merge this branch: bzr merge lp:~vanvugt/unity/fix-761465-unity3.0
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Unity Team Pending
Review via email: mp+67786@code.launchpad.net

Description of the change

Make icon highlight box the same size (maximum) for all icons in the dash (LP: #761465)

This fix has already been merged into lp:unity but it would be nice to have in unity 3.0 for natty too.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

Looks good. Approve!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/PlacesSimpleTile.cpp'
2--- src/PlacesSimpleTile.cpp 2011-04-11 00:50:55 +0000
3+++ src/PlacesSimpleTile.cpp 2011-07-13 03:31:17 +0000
4@@ -38,7 +38,8 @@
5 : PlacesTile (NUX_TRACKER_LOCATION, id),
6 _label (NULL),
7 _icon (NULL),
8- _uri (NULL)
9+ _uri (NULL),
10+ _idealiconsize (icon_size)
11 {
12 PlacesStyle *style = PlacesStyle::GetDefault ();
13 nux::VLayout *layout = new nux::VLayout ("", NUX_TRACKER_LOCATION);
14@@ -188,10 +189,10 @@
15
16 _icontex->GetTextureSize (&width, &height);
17
18- _highlight_geometry.x = (base.width - width) / 2;
19+ _highlight_geometry.width = MAX(width, _idealiconsize);
20+ _highlight_geometry.height = MAX(height, _idealiconsize);
21+ _highlight_geometry.x = (base.width - _highlight_geometry.width) / 2;
22 _highlight_geometry.y = 12;
23- _highlight_geometry.width = width;
24- _highlight_geometry.height = height;
25
26 return _highlight_geometry;
27 }
28
29=== modified file 'src/PlacesSimpleTile.h'
30--- src/PlacesSimpleTile.h 2011-03-09 14:13:41 +0000
31+++ src/PlacesSimpleTile.h 2011-07-13 03:31:17 +0000
32@@ -59,6 +59,7 @@
33 char* _label;
34 char* _icon;
35 char* _uri;
36+ int _idealiconsize;
37 IconTexture *_icontex;
38 nux::StaticCairoText *_cairotext;
39 };

Subscribers

People subscribed via source and target branches

to all changes: