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

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

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