~mc-return/nux/nux.merge-fix-deprecated-warnings

« back to all changes in this revision

Viewing changes to Nux/ScrollView.cpp

  • Committer: Tarmac
  • Author(s): Nick Dedekind
  • Date: 2012-08-23 13:49:12 UTC
  • mfrom: (650.1.3 nux)
  • Revision ID: tarmac-20120823134912-q9qjnyvek9lca7um
Fixed scrollview child mouse hit-test cut-off when using hidden scrollbars (LP#1039480). Fixes: https://bugs.launchpad.net/bugs/1039480. Approved by Andrea Azzarone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
    // for the area that is below the mouse.
187
187
 
188
188
    // Test the vertical scrollbar
189
 
    found_area = _vscrollbar->FindAreaUnderMouse(mouse_position, event_type);
190
 
    NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);
 
189
    if (m_vertical_scrollbar_enable)
 
190
    {
 
191
      found_area = _vscrollbar->FindAreaUnderMouse(mouse_position, event_type);
 
192
      NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);
 
193
    }
191
194
 
192
195
    // Test the horizontal scrollbar
193
 
    found_area = _hscrollbar->FindAreaUnderMouse(mouse_position, event_type);
194
 
    NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);
 
196
    if (m_horizontal_scrollbar_enable)
 
197
    {
 
198
      found_area = _hscrollbar->FindAreaUnderMouse(mouse_position, event_type);
 
199
      NUX_RETURN_VALUE_IF_NOTNULL(found_area, found_area);
 
200
    }
195
201
 
196
202
    // If the code gets here, it means that no area has been found yet.
197
203
    // Test the layout of the ScrollView