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

Proposed by Łukasz Zemczak on 2012-10-05
Status: Merged
Approved by: Michal Hruby on 2012-10-05
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) 2012-10-05 Approve on 2012-10-05
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
1=== modified file 'dash/DashView.cpp'
2--- dash/DashView.cpp 2012-10-04 07:36:35 +0000
3+++ dash/DashView.cpp 2012-10-05 11:49:41 +0000
4@@ -370,14 +370,11 @@
5 {
6 dash::Style& style = dash::Style::Instance();
7
8- auto main_layout = new nux::HLayout;
9- main_layout->SetLeftAndRightPadding(style.GetVSeparatorSize(), 0);
10- main_layout->SetTopAndBottomPadding(style.GetHSeparatorSize(), 0);
11- SetLayout(main_layout);
12-
13 layout_ = new nux::VLayout();
14+ layout_->SetLeftAndRightPadding(style.GetVSeparatorSize(), 0);
15+ layout_->SetTopAndBottomPadding(style.GetHSeparatorSize(), 0);
16+ SetLayout(layout_);
17 layout_->SetRedirectRenderingToTexture(true);
18- main_layout->AddLayout(layout_);
19
20 content_layout_ = new DashLayout(NUX_TRACKER_LOCATION);
21 content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding(), 0);
22@@ -527,7 +524,13 @@
23
24 void DashView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw)
25 {
26+ auto& style = dash::Style::Instance();
27+
28 renderer_.DrawInner(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());
29+
30+ nux::Geometry clip_geo = layout_->GetGeometry();
31+ clip_geo.x += style.GetVSeparatorSize();
32+ graphics_engine.PushClippingRectangle(clip_geo);
33
34 bool display_ghost = false;
35 bool preview_redraw = false;
36@@ -781,6 +784,8 @@
37 nux::GetPainter().PopBackgroundStack();
38 }
39
40+ graphics_engine.PopClippingRectangle();
41+
42 renderer_.DrawInnerCleanup(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());
43 }
44