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

Proposed by Andrea Azzarone on 2016-05-31
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2016-05-31
Approved revision: 4122
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) 2016-05-31 Approve on 2016-05-31
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.
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
=== modified file 'launcher/Launcher.cpp'
--- launcher/Launcher.cpp 2016-03-31 05:57:11 +0000
+++ launcher/Launcher.cpp 2016-05-31 12:27:26 +0000
@@ -2010,27 +2010,6 @@
2010 icon_renderer_->PreprocessIcons(args, base);2010 icon_renderer_->PreprocessIcons(args, base);
2011 EventLogic();2011 EventLogic();
20122012
2013 if (!IsOverlayOpen() && launcher_position_ == LauncherPosition::BOTTOM)
2014 {
2015 const double top_line_opacity = 0.15f * launcher_alpha;
2016
2017 gPainter.Paint2DQuadColor(GfxContext,
2018 nux::Geometry(bkg_box.x,
2019 bkg_box.y,
2020 bkg_box.width,
2021 SIDE_LINE_WIDTH.CP(cv_)),
2022 nux::color::White * top_line_opacity);
2023
2024 gPainter.Paint2DQuadColor(GfxContext,
2025 nux::Geometry(bkg_box.x,
2026 bkg_box.y,
2027 bkg_box.width,
2028 8),
2029 nux::Color(0x70000000),
2030 nux::Color(0x00000000),
2031 nux::Color(0x00000000),
2032 nux::Color(0x70000000));
2033 }
20342013
2035 /* draw launcher */2014 /* draw launcher */
2036 for (rev_it = args.rbegin(); rev_it != args.rend(); ++rev_it)2015 for (rev_it = args.rbegin(); rev_it != args.rend(); ++rev_it)
@@ -2075,6 +2054,28 @@
2075 nux::Color(0x70000000));2054 nux::Color(0x70000000));
2076 }2055 }
20772056
2057 if (!IsOverlayOpen() && launcher_position_ == LauncherPosition::BOTTOM)
2058 {
2059 const double top_line_opacity = 0.15f * launcher_alpha;
2060
2061 gPainter.Paint2DQuadColor(GfxContext,
2062 nux::Geometry(bkg_box.x,
2063 bkg_box.y,
2064 bkg_box.width,
2065 SIDE_LINE_WIDTH.CP(cv_)),
2066 nux::color::White * top_line_opacity);
2067
2068 gPainter.Paint2DQuadColor(GfxContext,
2069 nux::Geometry(bkg_box.x,
2070 bkg_box.y,
2071 bkg_box.width,
2072 8),
2073 nux::Color(0x70000000),
2074 nux::Color(0x00000000),
2075 nux::Color(0x00000000),
2076 nux::Color(0x70000000));
2077 }
2078
2078 // FIXME: can be removed for a bgk_box->SetAlpha once implemented2079 // FIXME: can be removed for a bgk_box->SetAlpha once implemented
2079 GfxContext.GetRenderStates().SetPremultipliedBlend(nux::DST_IN);2080 GfxContext.GetRenderStates().SetPremultipliedBlend(nux::DST_IN);
2080 nux::Color alpha_mask = nux::Color(0xFFAAAAAA) * launcher_alpha;2081 nux::Color alpha_mask = nux::Color(0xFFAAAAAA) * launcher_alpha;