Merge lp:~unity-team/unity/unity.fix-728935-2 into lp:unity

Proposed by Mirco Müller
Status: Merged
Merge reported by: Mirco Müller
Merged at revision: not available
Proposed branch: lp:~unity-team/unity/unity.fix-728935-2
Merge into: lp:unity
Diff against target: 97 lines (+48/-30)
1 file modified
src/Launcher.cpp (+48/-30)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-728935-2
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+53048@code.launchpad.net

Description of the change

Implemented new launcher key-nav highlight to stand out more clearly. Fixes LP: #728935. Uses design-artwork from LP: #733154

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'resources/round_glow_hl_62x62.png'
2Binary files resources/round_glow_hl_62x62.png 2011-02-01 14:41:24 +0000 and resources/round_glow_hl_62x62.png 2011-03-11 17:29:39 +0000 differ
3=== modified file 'src/Launcher.cpp'
4--- src/Launcher.cpp 2011-03-10 15:07:46 +0000
5+++ src/Launcher.cpp 2011-03-11 17:29:39 +0000
6@@ -2197,27 +2197,54 @@
7 GfxContext.GetRenderStates ().SetPremultipliedBlend (nux::SRC_OVER);
8 GfxContext.GetRenderStates ().SetColorMask (true, true, true, true);
9
10- /* draw tile */
11- if (arg.backlight_intensity < 1.0f)
12- {
13- RenderIcon(GfxContext,
14- arg,
15- _icon_outline_texture->GetDeviceTexture (),
16- nux::Color(0xAAAAAAAA),
17- (1.0f - arg.backlight_intensity) * arg.alpha,
18- arg.icon->_xform_coords["Tile"]);
19- }
20-
21- if (arg.backlight_intensity > 0.0f)
22- {
23- RenderIcon(GfxContext,
24- arg,
25- _icon_bkg_texture->GetDeviceTexture (),
26- arg.icon->BackgroundColor (),
27- arg.backlight_intensity * arg.alpha,
28- arg.icon->_xform_coords["Tile"]);
29- }
30- /* end tile draw */
31+ /* draw keyboard-navigation "highlight" if any */
32+ if (arg.keyboard_nav_hl)
33+ {
34+ RenderIcon (GfxContext,
35+ arg,
36+ _icon_glow_hl_texture->GetDeviceTexture (),
37+ nux::Color (0xFFFFFFFF),
38+ arg.alpha,
39+ arg.icon->_xform_coords["Glow"]);
40+
41+ RenderIcon (GfxContext,
42+ arg,
43+ _icon_outline_texture->GetDeviceTexture (),
44+ nux::Color(0xFFFFFFFF),
45+ 0.95f * arg.alpha,
46+ arg.icon->_xform_coords["Tile"]);
47+
48+ RenderIcon (GfxContext,
49+ arg,
50+ _icon_bkg_texture->GetDeviceTexture (),
51+ nux::Color(0xFFFFFFFF),
52+ 0.9f * arg.alpha,
53+ arg.icon->_xform_coords["Tile"]);
54+ }
55+ else
56+ {
57+ /* draw tile */
58+ if (arg.backlight_intensity < 1.0f)
59+ {
60+ RenderIcon(GfxContext,
61+ arg,
62+ _icon_outline_texture->GetDeviceTexture (),
63+ nux::Color(0xAAAAAAAA),
64+ (1.0f - arg.backlight_intensity) * arg.alpha,
65+ arg.icon->_xform_coords["Tile"]);
66+ }
67+
68+ if (arg.backlight_intensity > 0.0f)
69+ {
70+ RenderIcon(GfxContext,
71+ arg,
72+ _icon_bkg_texture->GetDeviceTexture (),
73+ arg.icon->BackgroundColor (),
74+ arg.backlight_intensity * arg.alpha,
75+ arg.icon->_xform_coords["Tile"]);
76+ }
77+ /* end tile draw */
78+ }
79
80 /* draw icon */
81 RenderIcon (GfxContext,
82@@ -2304,15 +2331,6 @@
83 arg.active_arrow ? 1 : 0,
84 geo);
85
86- /* draw keyboard-navigation "highlight" if any */
87- if (arg.keyboard_nav_hl)
88- RenderIcon (GfxContext,
89- arg,
90- _icon_glow_hl_texture->GetDeviceTexture (),
91- nux::Color (0xFFFFFFFF),
92- arg.alpha,
93- arg.icon->_xform_coords["Glow"]);
94-
95 /* draw superkey-shortcut label */
96 if (_super_show_launcher && !TapOnSuper ())
97 {