diff options
author | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 16:27:26 +0000 |
---|---|---|
committer | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 16:27:26 +0000 |
commit | c32ec7781ac500adf5b8253efb3866dbc7aa0a3b (patch) | |
tree | 60aa0bb87de04388d81dc791ef8b589bc1336ae7 /ash/system | |
parent | cc4418316c4a81cc12e6afdbec3561e0bdf26108 (diff) | |
download | chromium_src-c32ec7781ac500adf5b8253efb3866dbc7aa0a3b.zip chromium_src-c32ec7781ac500adf5b8253efb3866dbc7aa0a3b.tar.gz chromium_src-c32ec7781ac500adf5b8253efb3866dbc7aa0a3b.tar.bz2 |
Revert 156555 - Do not draw button border for the first visible button in TrayPopupTextButtonContainer which is the left most one showing up on row.
BUG=148729
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=156423
Review URL: https://codereview.chromium.org/10918199
TBR=jennyz@chromium.org
Review URL: https://codereview.chromium.org/10919268
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
-rw-r--r-- | ash/system/tray/tray_views.cc | 19 | ||||
-rw-r--r-- | ash/system/tray/tray_views.h | 6 |
2 files changed, 1 insertions, 24 deletions
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc index 8528751..1aa2050 100644 --- a/ash/system/tray/tray_views.cc +++ b/ash/system/tray/tray_views.cc @@ -327,7 +327,6 @@ TrayPopupTextButton::TrayPopupTextButton(views::ButtonListener* listener, const string16& text) : views::TextButton(listener, text), hover_(false), - paint_border_(true), hover_bg_(views::Background::CreateSolidBackground(SkColorSetARGB( 10, 0, 0, 0))), hover_border_(views::Border::CreateSolidBorder(1, kButtonStrokeColor)) { @@ -365,7 +364,7 @@ void TrayPopupTextButton::OnPaintBackground(gfx::Canvas* canvas) { void TrayPopupTextButton::OnPaintBorder(gfx::Canvas* canvas) { if (hover_) hover_border_->Paint(*this, canvas); - else if (paint_border_) + else views::TextButton::OnPaintBorder(canvas); } @@ -400,22 +399,6 @@ void TrayPopupTextButtonContainer::AddTextButton(TrayPopupTextButton* button) { AddChildView(button); } -void TrayPopupTextButtonContainer::Layout() { - // Do not draw border for the left most visible button. - bool found_first_visible = false; - for (int i = 0; i < child_count(); ++i) { - TrayPopupTextButton* button = - static_cast<TrayPopupTextButton*>(child_at(i)); - if (!found_first_visible && button->visible()) { - button->set_paint_border(false); - found_first_visible = true; - } else if (button->visible()) { - button->set_paint_border(true); - } - } - views::View::Layout(); -} - //////////////////////////////////////////////////////////////////////////////// // TrayPopupHeaderButton diff --git a/ash/system/tray/tray_views.h b/ash/system/tray/tray_views.h index 7481edf..c9ba066 100644 --- a/ash/system/tray/tray_views.h +++ b/ash/system/tray/tray_views.h @@ -181,8 +181,6 @@ class TrayPopupTextButton : public views::TextButton { TrayPopupTextButton(views::ButtonListener* listener, const string16& text); virtual ~TrayPopupTextButton(); - void set_paint_border(bool paint_border) { paint_border_ = paint_border; } - private: // Overridden from views::View. virtual gfx::Size GetPreferredSize() OVERRIDE; @@ -193,7 +191,6 @@ class TrayPopupTextButton : public views::TextButton { virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; bool hover_; - bool paint_border_; scoped_ptr<views::Background> hover_bg_; scoped_ptr<views::Border> hover_border_; @@ -211,9 +208,6 @@ class TrayPopupTextButtonContainer : public views::View { views::BoxLayout* layout() const { return layout_; } - // Overridden from views::View - virtual void Layout() OVERRIDE; - private: views::BoxLayout* layout_; |