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

Side by Side Diff: ash/common/system/chromeos/session/logout_button_tray.cc

Issue 2702583002: Remove the extra separator appears beside overview tray (Closed)
Patch Set: fix comments Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/common/system/overview/overview_button_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/chromeos/session/logout_button_tray.h" 5 #include "ash/common/system/chromeos/session/logout_button_tray.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/common/shelf/wm_shelf_util.h" 10 #include "ash/common/shelf/wm_shelf_util.h"
(...skipping 30 matching lines...) Expand all
41 views::MdTextButton* button = 41 views::MdTextButton* button =
42 views::MdTextButton::Create(this, base::string16()); 42 views::MdTextButton::Create(this, base::string16());
43 button->SetProminent(true); 43 button->SetProminent(true);
44 button->SetBgColorOverride(gfx::kGoogleRed700); 44 button->SetBgColorOverride(gfx::kGoogleRed700);
45 // Base font size + 2 = 14. 45 // Base font size + 2 = 14.
46 // TODO(estade): should this 2 be shared with other tray views? See 46 // TODO(estade): should this 2 be shared with other tray views? See
47 // crbug.com/623987 47 // crbug.com/623987
48 button->AdjustFontSize(2); 48 button->AdjustFontSize(2);
49 button_ = button; 49 button_ = button;
50 50
51 // Since |logout_button_tray| has a red background and it is distinguished 51 // Since LogoutButtonTray has a red background and it is distinguished
52 // by itself, no separator is needed on its right side. 52 // by itself, no separator is needed on its right side.
53 set_separator_visibility(false); 53 set_separator_visibility(false);
54 tray_container()->AddChildView(button_); 54 tray_container()->AddChildView(button_);
55 WmShell::Get()->system_tray_notifier()->AddLogoutButtonObserver(this); 55 WmShell::Get()->system_tray_notifier()->AddLogoutButtonObserver(this);
56 } 56 }
57 57
58 LogoutButtonTray::~LogoutButtonTray() { 58 LogoutButtonTray::~LogoutButtonTray() {
59 WmShell::Get()->system_tray_notifier()->RemoveLogoutButtonObserver(this); 59 WmShell::Get()->system_tray_notifier()->RemoveLogoutButtonObserver(this);
60 } 60 }
61 61
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 button_->SetText(base::string16()); 123 button_->SetText(base::string16());
124 button_->SetAccessibleName(title); 124 button_->SetAccessibleName(title);
125 button_->SetImage(views::LabelButton::STATE_NORMAL, 125 button_->SetImage(views::LabelButton::STATE_NORMAL,
126 gfx::CreateVectorIcon(kShelfLogoutIcon, kTrayIconColor)); 126 gfx::CreateVectorIcon(kShelfLogoutIcon, kTrayIconColor));
127 button_->SetMinSize(gfx::Size(kTrayItemSize, kTrayItemSize)); 127 button_->SetMinSize(gfx::Size(kTrayItemSize, kTrayItemSize));
128 } 128 }
129 UpdateVisibility(); 129 UpdateVisibility();
130 } 130 }
131 131
132 } // namespace ash 132 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/overview/overview_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698