Merge lp:~nick-dedekind/unity/lp1059607.dash-filter-redraw-6.0 into lp:unity/6.0

Proposed by Nick Dedekind
Status: Merged
Approved by: Neil J. Patel
Approved revision: no longer in the source branch.
Merged at revision: 2759
Proposed branch: lp:~nick-dedekind/unity/lp1059607.dash-filter-redraw-6.0
Merge into: lp:unity/6.0
Diff against target: 67 lines (+36/-0)
1 file modified
dash/LensView.cpp (+36/-0)
To merge this branch: bzr merge lp:~nick-dedekind/unity/lp1059607.dash-filter-redraw-6.0
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+127452@code.launchpad.net

Commit message

Fixed dash filter redraw issue (LP: #1059607)

Description of the change

Fixed dash filter redraw issue (LP: #1059607)

Redirected parent redraw check in Lens view.

---

The 6.0 version of https://code.launchpad.net/~nick-dedekind/unity/lp1059607.dash-filter-redraw

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/LensView.cpp'
2--- dash/LensView.cpp 2012-09-19 14:40:41 +0000
3+++ dash/LensView.cpp 2012-10-02 10:27:21 +0000
4@@ -23,6 +23,8 @@
5 #include <boost/lexical_cast.hpp>
6
7 #include <NuxCore/Logger.h>
8+#include <Nux/HScrollBar.h>
9+#include <Nux/VScrollBar.h>
10
11 #include "unity-shared/DashStyle.h"
12 #include "CoverflowResultView.h"
13@@ -97,6 +99,14 @@
14 up_area_ = area;
15 }
16
17+ void RedrawScrollbars()
18+ {
19+ if (m_horizontal_scrollbar_enable)
20+ _hscrollbar->QueueDraw();
21+ if (m_vertical_scrollbar_enable)
22+ _vscrollbar->QueueDraw();
23+ }
24+
25 protected:
26
27 // This is so we can break the natural key navigation path.
28@@ -692,6 +702,16 @@
29 nux::Geometry const& geo = GetGeometry();
30
31 gfx_context.PushClippingRectangle(geo);
32+
33+ if (RedirectedAncestor())
34+ {
35+ unsigned int alpha = 0, src = 0, dest = 0;
36+ gfx_context.GetRenderStates().GetBlend(alpha, src, dest);
37+ gfx_context.GetRenderStates().SetBlend(false);
38+ gfx_context.QRP_Color(GetX(), GetY(), GetWidth(), GetHeight(), nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
39+ gfx_context.GetRenderStates().SetBlend(alpha, src, dest);
40+ }
41+
42 nux::GetPainter().PaintBackground(gfx_context, geo);
43 gfx_context.PopClippingRectangle();
44 }
45@@ -699,6 +719,22 @@
46 void LensView::DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw)
47 {
48 gfx_context.PushClippingRectangle(GetGeometry());
49+
50+ // This is necessary when doing redirected rendering.
51+ // Clean the area below this view before drawing anything.
52+ if (RedirectedAncestor() && !IsFullRedraw())
53+ {
54+ // scrollbars are drawn in Draw, not DrawContent, so we need to flag them to redraw.
55+ scroll_view_->RedrawScrollbars();
56+ fscroll_view_->RedrawScrollbars();
57+
58+ unsigned int alpha = 0, src = 0, dest = 0;
59+ gfx_context.GetRenderStates().GetBlend(alpha, src, dest);
60+ gfx_context.GetRenderStates().SetBlend(false);
61+ gfx_context.QRP_Color(GetX(), GetY(), GetWidth(), GetHeight(), nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
62+ gfx_context.GetRenderStates().SetBlend(alpha, src, dest);
63+ }
64+
65 layout_->ProcessDraw(gfx_context, force_draw);
66 gfx_context.PopClippingRectangle();
67 }

Subscribers

People subscribed via source and target branches