Merge lp:~azzar1/unity/fix-bottom-launcher-low-graphic-mode into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4124
Proposed branch: lp:~azzar1/unity/fix-bottom-launcher-low-graphic-mode
Merge into: lp:unity
Diff against target: 60 lines (+22/-21)
1 file modified
launcher/Launcher.cpp (+22/-21)
To merge this branch: bzr merge lp:~azzar1/unity/fix-bottom-launcher-low-graphic-mode
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+296103@code.launchpad.net

Commit message

Order matters in the rendering. Draw launcher shadow after the background in all cases.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/Launcher.cpp'
2--- launcher/Launcher.cpp 2016-03-31 05:57:11 +0000
3+++ launcher/Launcher.cpp 2016-05-31 12:27:26 +0000
4@@ -2010,27 +2010,6 @@
5 icon_renderer_->PreprocessIcons(args, base);
6 EventLogic();
7
8- if (!IsOverlayOpen() && launcher_position_ == LauncherPosition::BOTTOM)
9- {
10- const double top_line_opacity = 0.15f * launcher_alpha;
11-
12- gPainter.Paint2DQuadColor(GfxContext,
13- nux::Geometry(bkg_box.x,
14- bkg_box.y,
15- bkg_box.width,
16- SIDE_LINE_WIDTH.CP(cv_)),
17- nux::color::White * top_line_opacity);
18-
19- gPainter.Paint2DQuadColor(GfxContext,
20- nux::Geometry(bkg_box.x,
21- bkg_box.y,
22- bkg_box.width,
23- 8),
24- nux::Color(0x70000000),
25- nux::Color(0x00000000),
26- nux::Color(0x00000000),
27- nux::Color(0x70000000));
28- }
29
30 /* draw launcher */
31 for (rev_it = args.rbegin(); rev_it != args.rend(); ++rev_it)
32@@ -2075,6 +2054,28 @@
33 nux::Color(0x70000000));
34 }
35
36+ if (!IsOverlayOpen() && launcher_position_ == LauncherPosition::BOTTOM)
37+ {
38+ const double top_line_opacity = 0.15f * launcher_alpha;
39+
40+ gPainter.Paint2DQuadColor(GfxContext,
41+ nux::Geometry(bkg_box.x,
42+ bkg_box.y,
43+ bkg_box.width,
44+ SIDE_LINE_WIDTH.CP(cv_)),
45+ nux::color::White * top_line_opacity);
46+
47+ gPainter.Paint2DQuadColor(GfxContext,
48+ nux::Geometry(bkg_box.x,
49+ bkg_box.y,
50+ bkg_box.width,
51+ 8),
52+ nux::Color(0x70000000),
53+ nux::Color(0x00000000),
54+ nux::Color(0x00000000),
55+ nux::Color(0x70000000));
56+ }
57+
58 // FIXME: can be removed for a bgk_box->SetAlpha once implemented
59 GfxContext.GetRenderStates().SetPremultipliedBlend(nux::DST_IN);
60 nux::Color alpha_mask = nux::Color(0xFFAAAAAA) * launcher_alpha;