Chromium Code Reviews| Index: ui/views/controls/menu/menu_scroll_view_container.cc |
| diff --git a/ui/views/controls/menu/menu_scroll_view_container.cc b/ui/views/controls/menu/menu_scroll_view_container.cc |
| index 1dedb82790be9e412c1e2b30ac2a4768b0236a9d..22f2138adeb3f325579e55e2f8c13bbb0fc27f28 100644 |
| --- a/ui/views/controls/menu/menu_scroll_view_container.cc |
| +++ b/ui/views/controls/menu/menu_scroll_view_container.cc |
| @@ -26,6 +26,8 @@ namespace views { |
| namespace { |
| +static const int kBorderPaddingDueToRoundedCorners = 1; |
| + |
| // MenuScrollButton ------------------------------------------------------------ |
| // MenuScrollButton is used for the scroll buttons when not all menu items fit |
| @@ -251,6 +253,17 @@ void MenuScrollViewContainer::GetAccessibleState( |
| state->state = ui::AccessibilityTypes::STATE_FOCUSED; |
| } |
| +gfx::Insets MenuScrollViewContainer::GetInsets() const { |
| + gfx::Insets insets = View::GetInsets(); |
| + if (MenuConfig::instance(ui::NativeTheme::instance()).has_rounded_corners) { |
|
sky
2013/01/25 16:10:52
ui::NativeTheme::instance() -> GetNativeTheme()
varunjain
2013/01/25 18:50:40
not needed since I am using MenuConfig now.
|
| + insets += gfx::Insets(kBorderPaddingDueToRoundedCorners, |
| + kBorderPaddingDueToRoundedCorners, |
| + kBorderPaddingDueToRoundedCorners, |
| + kBorderPaddingDueToRoundedCorners); |
| + } |
| + return insets; |
| +} |
| + |
| void MenuScrollViewContainer::OnBoundsChanged( |
| const gfx::Rect& previous_bounds) { |
| gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize(); |