Merge lp:~didrocks/unity/launcher-dimmed into lp:unity

Proposed by Didier Roche-Tolomelli
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 1132
Proposed branch: lp:~didrocks/unity/launcher-dimmed
Merge into: lp:unity
Diff against target: 28 lines (+5/-6)
1 file modified
src/Launcher.cpp (+5/-6)
To merge this branch: bzr merge lp:~didrocks/unity/launcher-dimmed
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+57456@code.launchpad.net

Description of the change

restore the operator after the blending as discussed with loicm, remove the
double unecessary PopClippingRectangle as well. Should fix dimmed launcher after
icon dnd (LP: #747304)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Launcher.cpp'
2--- src/Launcher.cpp 2011-04-13 09:07:45 +0000
3+++ src/Launcher.cpp 2011-04-13 10:06:41 +0000
4@@ -2794,19 +2794,18 @@
5 nux::Color(0x00000000),
6 nux::Color(0x60000000));
7
8- // FIXME: can be removed for a bgk_box->SetAlpha once implemented
9+ // FIXME: can be removed for a bgk_box->SetAlpha once implemented
10 GfxContext.GetRenderStates ().SetPremultipliedBlend (nux::DST_IN);
11 nux::Color alpha_mask = nux::Color(0xAAAAAAAA);
12 alpha_mask.SetRGBA (alpha_mask.R () * launcher_alpha, alpha_mask.G () * launcher_alpha,
13 alpha_mask.B () * launcher_alpha, launcher_alpha);
14 gPainter.Paint2DQuadColor (GfxContext, bkg_box, alpha_mask);
15
16- GfxContext.GetRenderStates().SetColorMask (true, true, true, true);
17- GfxContext.GetRenderStates ().SetBlend (false);
18+ GfxContext.GetRenderStates ().SetColorMask (true, true, true, true);
19+ GfxContext.GetRenderStates ().SetPremultipliedBlend (nux::SRC_OVER);
20
21- gPainter.PopBackground();
22- GfxContext.PopClippingRectangle();
23- GfxContext.PopClippingRectangle();
24+ gPainter.PopBackground ();
25+ GfxContext.PopClippingRectangle ();
26 }
27
28 void Launcher::PostDraw(nux::GraphicsEngine& GfxContext, bool force_draw)