Merge lp:~azzar1/unity/fix-scrolling-filter-expand into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4176
Proposed branch: lp:~azzar1/unity/fix-scrolling-filter-expand
Merge into: lp:unity
Diff against target: 30 lines (+9/-0)
2 files modified
dash/FilterExpanderLabel.cpp (+8/-0)
dash/FilterExpanderLabel.h (+1/-0)
To merge this branch: bzr merge lp:~azzar1/unity/fix-scrolling-filter-expand
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+303112@code.launchpad.net

Commit message

Filter out scrolling envents for FilterExpanderLabel.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Thanks... Wondering why the SetMouseWheel nux function doesn't work here, but this is fine anyway.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/FilterExpanderLabel.cpp'
2--- dash/FilterExpanderLabel.cpp 2015-05-08 04:24:43 +0000
3+++ dash/FilterExpanderLabel.cpp 2016-08-17 09:51:31 +0000
4@@ -273,6 +273,14 @@
5 graphics_engine.PopClippingRectangle();
6 }
7
8+nux::Area* FilterExpanderLabel::FindAreaUnderMouse(const nux::Point& mouse_position, nux::NuxEventType event_type)
9+{
10+ if (event_type == nux::EVENT_MOUSE_WHEEL)
11+ return nullptr;
12+ else
13+ return nux::View::FindAreaUnderMouse(mouse_position, event_type);
14+}
15+
16 //
17 // Key navigation
18 //
19
20=== modified file 'dash/FilterExpanderLabel.h'
21--- dash/FilterExpanderLabel.h 2015-05-05 02:03:52 +0000
22+++ dash/FilterExpanderLabel.h 2016-08-17 09:51:31 +0000
23@@ -69,6 +69,7 @@
24 nux::Property<bool> expanded;
25
26 protected:
27+ nux::Area* FindAreaUnderMouse(const nux::Point&, nux::NuxEventType) override;
28 virtual bool AcceptKeyNavFocus();
29 virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);
30 virtual void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw);