Merge lp:~sil2100/unity/fix-1061081-7.0 into lp:unity

Proposed by Łukasz Zemczak
Status: Merged
Approved by: Michal Hruby
Approved revision: 2805
Merged at revision: 2807
Proposed branch: lp:~sil2100/unity/fix-1061081-7.0
Merge into: lp:unity
Diff against target: 43 lines (+11/-6)
1 file modified
dash/DashView.cpp (+11/-6)
To merge this branch: bzr merge lp:~sil2100/unity/fix-1061081-7.0
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+128230@code.launchpad.net

Commit message

Cherry-picked andyrock's fix:
Revert rev 2780.
Use clip region to fix dash/launcher separator drawing bug.

Description of the change

Cherry-picked fix submitted to 6.0 (should be other way around!)

== Problem ==
[regression] Spinner doesn't spin around its center

== Fix ==
Revert buggy rev. Use clip region to fix dash/launcher separator drawing bug.

To post a comment you must log in.
Michal Hruby (mhr3) wrote :

Released in 6.0 series, should have been in trunk already...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dash/DashView.cpp'
--- dash/DashView.cpp 2012-10-04 07:36:35 +0000
+++ dash/DashView.cpp 2012-10-05 11:49:41 +0000
@@ -370,14 +370,11 @@
370{370{
371 dash::Style& style = dash::Style::Instance();371 dash::Style& style = dash::Style::Instance();
372372
373 auto main_layout = new nux::HLayout;
374 main_layout->SetLeftAndRightPadding(style.GetVSeparatorSize(), 0);
375 main_layout->SetTopAndBottomPadding(style.GetHSeparatorSize(), 0);
376 SetLayout(main_layout);
377
378 layout_ = new nux::VLayout();373 layout_ = new nux::VLayout();
374 layout_->SetLeftAndRightPadding(style.GetVSeparatorSize(), 0);
375 layout_->SetTopAndBottomPadding(style.GetHSeparatorSize(), 0);
376 SetLayout(layout_);
379 layout_->SetRedirectRenderingToTexture(true);377 layout_->SetRedirectRenderingToTexture(true);
380 main_layout->AddLayout(layout_);
381378
382 content_layout_ = new DashLayout(NUX_TRACKER_LOCATION);379 content_layout_ = new DashLayout(NUX_TRACKER_LOCATION);
383 content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding(), 0);380 content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding(), 0);
@@ -527,7 +524,13 @@
527524
528void DashView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw)525void DashView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw)
529{526{
527 auto& style = dash::Style::Instance();
528
530 renderer_.DrawInner(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());529 renderer_.DrawInner(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());
530
531 nux::Geometry clip_geo = layout_->GetGeometry();
532 clip_geo.x += style.GetVSeparatorSize();
533 graphics_engine.PushClippingRectangle(clip_geo);
531534
532 bool display_ghost = false;535 bool display_ghost = false;
533 bool preview_redraw = false;536 bool preview_redraw = false;
@@ -781,6 +784,8 @@
781 nux::GetPainter().PopBackgroundStack();784 nux::GetPainter().PopBackgroundStack();
782 }785 }
783786
787 graphics_engine.PopClippingRectangle();
788
784 renderer_.DrawInnerCleanup(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());789 renderer_.DrawInnerCleanup(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());
785}790}
786791