Index: ash/system/network/tray_network.cc |
diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc |
index 1efcfbf771a515c5037562da5e1fed712bf383d8..84d2db25be59db18e8205157ba53f7eceb6206f5 100644 |
--- a/ash/system/network/tray_network.cc |
+++ b/ash/system/network/tray_network.cc |
@@ -114,7 +114,11 @@ class HoverHighlightView : public views::View { |
// A custom scroll-view that has a specified dimension. |
class FixedSizedScrollView : public views::ScrollView { |
public: |
- FixedSizedScrollView() {} |
+ FixedSizedScrollView() { |
+ set_focusable(true); |
+ set_notify_enter_exit_on_child(true); |
+ } |
+ |
virtual ~FixedSizedScrollView() {} |
void SetContentsView(View* view) { |
@@ -130,6 +134,21 @@ class FixedSizedScrollView : public views::ScrollView { |
return fixed_size_; |
} |
+ virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE { |
+ views::View* contents = GetContents(); |
+ gfx::Rect bounds = contents->bounds(); |
+ bounds.set_width(width() - GetScrollBarWidth()); |
+ contents->SetBoundsRect(bounds); |
+ } |
+ |
+ virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE { |
+ RequestFocus(); |
+ } |
+ |
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE { |
+ // Do not paint the focus border. |
+ } |
+ |
gfx::Size fixed_size_; |
DISALLOW_COPY_AND_ASSIGN(FixedSizedScrollView); |