diff options
Diffstat (limited to 'ui/views/controls/scroll_view.cc')
-rw-r--r-- | ui/views/controls/scroll_view.cc | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc index 11ffc02..3659c35 100644 --- a/ui/views/controls/scroll_view.cc +++ b/ui/views/controls/scroll_view.cc @@ -117,8 +117,6 @@ ScrollView::ScrollView() vert_sb_(new NativeScrollBar(false)), resize_corner_(NULL), hide_horizontal_scrollbar_(false) { - set_notify_enter_exit_on_child(true); - AddChildView(contents_viewport_); AddChildView(header_viewport_); @@ -254,17 +252,15 @@ void ScrollView::Layout() { } if (horiz_sb_required) { - int height_offset = horiz_sb_->GetContentOverlapSize(); horiz_sb_->SetBounds(0, - viewport_bounds.bottom() - height_offset, + viewport_bounds.bottom(), viewport_bounds.right(), - horiz_sb_height + height_offset); + horiz_sb_height); } if (vert_sb_required) { - int width_offset = vert_sb_->GetContentOverlapSize(); - vert_sb_->SetBounds(viewport_bounds.right() - width_offset, + vert_sb_->SetBounds(viewport_bounds.right(), 0, - vert_sb_width + width_offset, + vert_sb_width, viewport_bounds.bottom()); } if (resize_corner_required) { @@ -316,20 +312,6 @@ bool ScrollView::OnMouseWheel(const ui::MouseWheelEvent& e) { return processed; } -void ScrollView::OnMouseEntered(const ui::MouseEvent& event) { - if (horiz_sb_) - horiz_sb_->OnMouseEnteredScrollView(event); - if (vert_sb_) - vert_sb_->OnMouseEnteredScrollView(event); -} - -void ScrollView::OnMouseExited(const ui::MouseEvent& event) { - if (horiz_sb_) - horiz_sb_->OnMouseExitedScrollView(event); - if (vert_sb_) - vert_sb_->OnMouseExitedScrollView(event); -} - void ScrollView::OnGestureEvent(ui::GestureEvent* event) { // If the event happened on one of the scrollbars, then those events are // sent directly to the scrollbars. Otherwise, only scroll events are sent to |