summaryrefslogtreecommitdiffstats
path: root/views/controls/menu/menu_scroll_view_container.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/menu/menu_scroll_view_container.cc')
-rw-r--r--views/controls/menu/menu_scroll_view_container.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/views/controls/menu/menu_scroll_view_container.cc b/views/controls/menu/menu_scroll_view_container.cc
index 6089838..28ce10a 100644
--- a/views/controls/menu/menu_scroll_view_container.cc
+++ b/views/controls/menu/menu_scroll_view_container.cc
@@ -252,13 +252,6 @@ void MenuScrollViewContainer::Layout() {
scroll_view_->Layout();
}
-void MenuScrollViewContainer::OnBoundsChanged() {
- gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize();
- scroll_up_button_->SetVisible(content_pref.height() > height());
- scroll_down_button_->SetVisible(content_pref.height() > height());
- Layout();
-}
-
gfx::Size MenuScrollViewContainer::GetPreferredSize() {
gfx::Size prefsize = scroll_view_->GetContents()->GetPreferredSize();
gfx::Insets insets = GetInsets();
@@ -276,4 +269,12 @@ AccessibilityTypes::State MenuScrollViewContainer::GetAccessibleState() {
return AccessibilityTypes::STATE_FOCUSED;
}
+void MenuScrollViewContainer::OnBoundsChanged(
+ const gfx::Rect& previous_bounds) {
+ gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize();
+ scroll_up_button_->SetVisible(content_pref.height() > height());
+ scroll_down_button_->SetVisible(content_pref.height() > height());
+ Layout();
+}
+
} // namespace views