Merge lp:~unity-team/unity/unity.fix-1038138 into lp:unity

Proposed by Andrea Cimitan on 2012-08-21
Status: Merged
Approved by: Andrea Azzarone on 2012-08-23
Approved revision: 2600
Merged at revision: 2613
Proposed branch: lp:~unity-team/unity/unity.fix-1038138
Merge into: lp:unity
Diff against target: 48 lines (+15/-2)
1 file modified
unity-shared/IconRenderer.cpp (+15/-2)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-1038138
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) 2012-08-21 Approve on 2012-08-23
Review via email: mp+120549@code.launchpad.net

Commit message

Fix bug 1038138 by applying some tweaks for tiles with backlight 0.0f

Description of the change

EDIT: TESTED works fine

I can't test this, cause unity trunk doesn't run in both of my notebooks, I used unity-standalone but I need proper testing.

It should fix the bug of the linked bugreport

To post a comment you must log in.
2599. By Nick Dedekind on 2012-08-21

Removed lancher icon backlight intensity on colorify backgound.

2600. By Andrea Cimitan on 2012-08-21

Don't use custom float alpha, not needed

Andrea Azzarone (azzar1) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-shared/IconRenderer.cpp'
2--- unity-shared/IconRenderer.cpp 2012-08-21 10:33:07 +0000
3+++ unity-shared/IconRenderer.cpp 2012-08-21 15:21:18 +0000
4@@ -403,6 +403,7 @@
5 nux::Color edge_color(0x55555555);
6 nux::Color colorify = arg.colorify;
7 nux::Color background_tile_colorify = arg.colorify;
8+ bool colorify_background = arg.colorify_background;
9 float backlight_intensity = arg.backlight_intensity;
10 float glow_intensity = arg.glow_intensity;
11 float shadow_intensity = 0.6f;
12@@ -415,6 +416,18 @@
13
14 bool force_filter = icon_size != background->GetWidth();
15
16+ if (backlight_intensity == 0.0f)
17+ {
18+ // Colorize tiles without backlight with the launcher background color
19+ colorify_background = true;
20+ }
21+
22+ if (colorify_background)
23+ {
24+ // Extra tweaks for tiles that are colorized with the launcher background color
25+ background_tile_color = nux::color::White;
26+ }
27+
28 if (arg.keyboard_nav_hl)
29 {
30 background_tile_color = nux::color::White;
31@@ -434,7 +447,7 @@
32 colorify.blue += (0.5f + 0.5f * arg.saturation) * (1.0f - colorify.blue);
33 colorify.green += (0.5f + 0.5f * arg.saturation) * (1.0f - colorify.green);
34
35- if (arg.colorify_background)
36+ if (colorify_background)
37 {
38 background_tile_colorify = background_tile_colorify * 0.7f;
39 }
40@@ -494,7 +507,7 @@
41 edge_color = edge_color + ((background_tile_color - edge_color) * backlight_intensity);
42 nux::Color edge_tile_colorify = background_tile_colorify;
43
44- if (arg.colorify_background && !arg.keyboard_nav_hl)
45+ if (colorify_background && !arg.keyboard_nav_hl)
46 {
47 // Mix edge_tile_colorify with plain white (1.0f).
48 // Would be nicer to tweak value from HSV colorspace, instead.