Merge lp:~azzar1/unity/fix-1061081 into lp:unity/6.0

Proposed by Andrea Azzarone on 2012-10-04
Status: Merged
Approved by: Didier Roche on 2012-10-04
Approved revision: 2762
Merged at revision: 2763
Proposed branch: lp:~azzar1/unity/fix-1061081
Merge into: lp:unity/6.0
Diff against target: 43 lines (+11/-6)
1 file modified
dash/DashView.cpp (+11/-6)
To merge this branch: bzr merge lp:~azzar1/unity/fix-1061081
Reviewer Review Type Date Requested Status
Łukasz Zemczak 2012-10-04 Approve on 2012-10-04
Review via email: mp+127913@code.launchpad.net

Commit message

Revert rev 2753.
Use clip region to fix dash/launcher separator drawing bug.

Description of the change

== 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.
Łukasz Zemczak (sil2100) wrote :

WFM.

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-01 17:38:16 +0000
3+++ dash/DashView.cpp 2012-10-04 00:29:20 +0000
4@@ -338,14 +338,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@@ -494,7 +491,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@@ -748,6 +751,8 @@
37 nux::GetPainter().PopBackgroundStack();
38 }
39
40+ graphics_engine.PopClippingRectangle();
41+
42 renderer_.DrawInnerCleanup(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());
43 }
44

Subscribers

People subscribed via source and target branches