Merge lp:~azzar1/unity/fix-1059562 into lp:unity

Proposed by Andrea Azzarone on 2012-10-01
Status: Merged
Approved by: Andrea Azzarone on 2012-10-09
Approved revision: 2775
Merged at revision: 2816
Proposed branch: lp:~azzar1/unity/fix-1059562
Merge into: lp:unity
Diff against target: 60 lines (+12/-29)
1 file modified
unity-shared/SearchBar.cpp (+12/-29)
To merge this branch: bzr merge lp:~azzar1/unity/fix-1059562
Reviewer Review Type Date Requested Status
Nick Dedekind (community) 2012-10-01 Approve on 2012-10-08
Review via email: mp+127272@code.launchpad.net

Commit message

Fix rendering flaw in search entry. (LP: #1059562)

Description of the change

== Problem ==
[Dash] Rendering flaw of the dash search entry.

== Fix ==
Clear area below search entry if necessary.

To post a comment you must log in.
Nick Dedekind (nick-dedekind) wrote :

There are other checks for RedirectedAncestor in SearchBar::Draw which I believe you can now remove.

review: Needs Fixing
Andrea Azzarone (azzar1) wrote :

> There are other checks for RedirectedAncestor in SearchBar::Draw which I
> believe you can now remove.

Done.

Nick Dedekind (nick-dedekind) wrote :

LGTM

review: Approve
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1499/console reported an error when processing this lp:~andyrock/unity/fix-1059562 branch.
Not merging it.

Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1500/console reported an error when processing this lp:~andyrock/unity/fix-1059562 branch.
Not merging it.

Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1503/console reported an error when processing this lp:~andyrock/unity/fix-1059562 branch.
Not merging it.

Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1505/console reported an error when processing this lp:~andyrock/unity/fix-1059562 branch.
Not merging it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-shared/SearchBar.cpp'
2--- unity-shared/SearchBar.cpp 2012-09-24 15:46:08 +0000
3+++ unity-shared/SearchBar.cpp 2012-10-08 10:44:19 +0000
4@@ -363,6 +363,17 @@
5
6 graphics_engine.PushClippingRectangle(base);
7
8+ if (RedirectedAncestor())
9+ {
10+ unsigned int alpha = 0, src = 0, dest = 0;
11+ graphics_engine.GetRenderStates().GetBlend(alpha, src, dest);
12+ // This is necessary when doing redirected rendering.
13+ // Clean the area below this view before drawing anything.
14+ graphics_engine.GetRenderStates().SetBlend(false);
15+ graphics_engine.QRP_Color(base.x, base.y, base.width, base.height, nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
16+ graphics_engine.GetRenderStates().SetBlend(alpha, src, dest);
17+ }
18+
19 bg_layer_->SetGeometry(nux::Geometry(base.x, base.y, last_width_, last_height_));
20 nux::GetPainter().RenderSinglePaintLayer(graphics_engine,
21 bg_layer_->GetGeometry(),
22@@ -380,38 +391,10 @@
23 if (!highlight_layer_)
24 highlight_layer_.reset(style.FocusOverlay(geo.width, geo.height));
25
26- if (RedirectedAncestor())
27- {
28- unsigned int alpha = 0, src = 0, dest = 0;
29- graphics_engine.GetRenderStates().GetBlend(alpha, src, dest);
30- // This is necessary when doing redirected rendering.
31- // Clean the area below this view before drawing anything.
32- graphics_engine.GetRenderStates().SetBlend(false);
33- graphics_engine.QRP_Color(geo.x, geo.y, geo.width, geo.height, nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
34- graphics_engine.GetRenderStates().SetBlend(alpha, src, dest);
35- }
36-
37 highlight_layer_->SetGeometry(geo);
38 highlight_layer_->Renderlayer(graphics_engine);
39 }
40- else if (expander_view_ && expander_view_->IsVisible())
41- {
42- nux::Geometry geo(expander_view_->GetGeometry());
43-
44- geo.y -= (HIGHLIGHT_HEIGHT- geo.height) / 2;
45- geo.height = HIGHLIGHT_HEIGHT;
46-
47- if (RedirectedAncestor())
48- {
49- unsigned int alpha = 0, src = 0, dest = 0;
50- graphics_engine.GetRenderStates().GetBlend(alpha, src, dest);
51- // This is necessary when doing redirected rendering.
52- // Clean the area below this view before drawing anything.
53- graphics_engine.GetRenderStates().SetBlend(false);
54- graphics_engine.QRP_Color(geo.x, geo.y, geo.width, geo.height, nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
55- graphics_engine.GetRenderStates().SetBlend(alpha, src, dest);
56- }
57- }
58+
59 graphics_engine.PopClippingRectangle();
60 }
61