Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: ash/system/network/tray_network.cc

Issue 9706063: ash: A number of ui/ux changes from feedback/to better match the mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | ash/system/power/tray_power_date.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ash/shell.cc ('k') | ash/system/power/tray_power_date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698