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
=== modified file 'unity-shared/SearchBar.cpp'
--- unity-shared/SearchBar.cpp 2012-09-24 15:46:08 +0000
+++ unity-shared/SearchBar.cpp 2012-10-08 10:44:19 +0000
@@ -363,6 +363,17 @@
363363
364 graphics_engine.PushClippingRectangle(base);364 graphics_engine.PushClippingRectangle(base);
365365
366 if (RedirectedAncestor())
367 {
368 unsigned int alpha = 0, src = 0, dest = 0;
369 graphics_engine.GetRenderStates().GetBlend(alpha, src, dest);
370 // This is necessary when doing redirected rendering.
371 // Clean the area below this view before drawing anything.
372 graphics_engine.GetRenderStates().SetBlend(false);
373 graphics_engine.QRP_Color(base.x, base.y, base.width, base.height, nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
374 graphics_engine.GetRenderStates().SetBlend(alpha, src, dest);
375 }
376
366 bg_layer_->SetGeometry(nux::Geometry(base.x, base.y, last_width_, last_height_));377 bg_layer_->SetGeometry(nux::Geometry(base.x, base.y, last_width_, last_height_));
367 nux::GetPainter().RenderSinglePaintLayer(graphics_engine,378 nux::GetPainter().RenderSinglePaintLayer(graphics_engine,
368 bg_layer_->GetGeometry(),379 bg_layer_->GetGeometry(),
@@ -380,38 +391,10 @@
380 if (!highlight_layer_)391 if (!highlight_layer_)
381 highlight_layer_.reset(style.FocusOverlay(geo.width, geo.height));392 highlight_layer_.reset(style.FocusOverlay(geo.width, geo.height));
382393
383 if (RedirectedAncestor())
384 {
385 unsigned int alpha = 0, src = 0, dest = 0;
386 graphics_engine.GetRenderStates().GetBlend(alpha, src, dest);
387 // This is necessary when doing redirected rendering.
388 // Clean the area below this view before drawing anything.
389 graphics_engine.GetRenderStates().SetBlend(false);
390 graphics_engine.QRP_Color(geo.x, geo.y, geo.width, geo.height, nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
391 graphics_engine.GetRenderStates().SetBlend(alpha, src, dest);
392 }
393
394 highlight_layer_->SetGeometry(geo);394 highlight_layer_->SetGeometry(geo);
395 highlight_layer_->Renderlayer(graphics_engine);395 highlight_layer_->Renderlayer(graphics_engine);
396 }396 }
397 else if (expander_view_ && expander_view_->IsVisible())397
398 {
399 nux::Geometry geo(expander_view_->GetGeometry());
400
401 geo.y -= (HIGHLIGHT_HEIGHT- geo.height) / 2;
402 geo.height = HIGHLIGHT_HEIGHT;
403
404 if (RedirectedAncestor())
405 {
406 unsigned int alpha = 0, src = 0, dest = 0;
407 graphics_engine.GetRenderStates().GetBlend(alpha, src, dest);
408 // This is necessary when doing redirected rendering.
409 // Clean the area below this view before drawing anything.
410 graphics_engine.GetRenderStates().SetBlend(false);
411 graphics_engine.QRP_Color(geo.x, geo.y, geo.width, geo.height, nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
412 graphics_engine.GetRenderStates().SetBlend(alpha, src, dest);
413 }
414 }
415 graphics_engine.PopClippingRectangle();398 graphics_engine.PopClippingRectangle();
416}399}
417400