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

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

Issue 2621323003: Remove the extra separator appears on the right side of the shelf (Closed)
Patch Set: Created 3 years, 11 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/tray/system_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/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (MaterialDesignController::IsShelfMaterial()) { 108 if (MaterialDesignController::IsShelfMaterial()) {
109 views::MdTextButton* button = 109 views::MdTextButton* button =
110 views::MdTextButton::Create(this, base::string16()); 110 views::MdTextButton::Create(this, base::string16());
111 button->SetProminent(true); 111 button->SetProminent(true);
112 button->SetBgColorOverride(gfx::kGoogleRed700); 112 button->SetBgColorOverride(gfx::kGoogleRed700);
113 // Base font size + 2 = 14. 113 // Base font size + 2 = 14.
114 // TODO(estade): should this 2 be shared with other tray views? See 114 // TODO(estade): should this 2 be shared with other tray views? See
115 // crbug.com/623987 115 // crbug.com/623987
116 button->AdjustFontSize(2); 116 button->AdjustFontSize(2);
117 button_ = button; 117 button_ = button;
118
119 // Since |logout_button_tray| has a red background and it is distinguished
120 // by itself, no separator is needed on its right side.
121 set_separator_visibility(false);
118 } else { 122 } else {
119 button_ = new LogoutButton(this); 123 button_ = new LogoutButton(this);
120 } 124 }
121 tray_container()->AddChildView(button_); 125 tray_container()->AddChildView(button_);
122 if (!MaterialDesignController::IsShelfMaterial()) 126 if (!MaterialDesignController::IsShelfMaterial())
123 tray_container()->SetBorder(views::NullBorder()); 127 tray_container()->SetBorder(views::NullBorder());
124 WmShell::Get()->system_tray_notifier()->AddLogoutButtonObserver(this); 128 WmShell::Get()->system_tray_notifier()->AddLogoutButtonObserver(this);
125 } 129 }
126 130
127 LogoutButtonTray::~LogoutButtonTray() { 131 LogoutButtonTray::~LogoutButtonTray() {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 button_->SetAccessibleName(title); 202 button_->SetAccessibleName(title);
199 button_->SetImage( 203 button_->SetImage(
200 views::LabelButton::STATE_NORMAL, 204 views::LabelButton::STATE_NORMAL,
201 gfx::CreateVectorIcon(gfx::VectorIconId::SHELF_LOGOUT, kTrayIconColor)); 205 gfx::CreateVectorIcon(gfx::VectorIconId::SHELF_LOGOUT, kTrayIconColor));
202 button_->SetMinSize(gfx::Size(button_size, button_size)); 206 button_->SetMinSize(gfx::Size(button_size, button_size));
203 } 207 }
204 UpdateVisibility(); 208 UpdateVisibility();
205 } 209 }
206 210
207 } // namespace ash 211 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698