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

Side by Side Diff: ash/system/logout_button/logout_button_tray.cc

Issue 162753007: Fix size of big, red logout button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/system/logout_button/logout_button_tray.h" 5 #include "ash/system/logout_button/logout_button_tray.h"
6 6
7 #include "ash/shelf/shelf_types.h" 7 #include "ash/shelf/shelf_types.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/status_area_widget.h" 9 #include "ash/system/status_area_widget.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 private: 76 private:
77 DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationDialogDelegate); 77 DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationDialogDelegate);
78 }; 78 };
79 79
80 } // namespace 80 } // namespace
81 81
82 LogoutButton::LogoutButton(views::ButtonListener* listener) 82 LogoutButton::LogoutButton(views::ButtonListener* listener)
83 : views::LabelButton(listener, base::string16()) { 83 : views::LabelButton(listener, base::string16()) {
84 SetupLabelForTray(label()); 84 SetupLabelForTray(label());
85 SetFontList(label()->font_list());
85 for (size_t state = 0; state < views::Button::STATE_COUNT; ++state) 86 for (size_t state = 0; state < views::Button::STATE_COUNT; ++state)
86 SetTextColor(static_cast<views::Button::ButtonState>(state), SK_ColorWHITE); 87 SetTextColor(static_cast<views::Button::ButtonState>(state), SK_ColorWHITE);
87 88
88 scoped_ptr<views::LabelButtonBorder> border( 89 scoped_ptr<views::LabelButtonBorder> border(
89 new views::LabelButtonBorder(views::Button::STYLE_TEXTBUTTON)); 90 new views::LabelButtonBorder(views::Button::STYLE_TEXTBUTTON));
90 border->SetPainter(false, views::Button::STATE_NORMAL, 91 border->SetPainter(false, views::Button::STATE_NORMAL,
91 views::Painter::CreateImageGridPainter(kLogoutButtonNormalImages)); 92 views::Painter::CreateImageGridPainter(kLogoutButtonNormalImages));
92 border->SetPainter(false, views::Button::STATE_HOVERED, 93 border->SetPainter(false, views::Button::STATE_HOVERED,
93 views::Painter::CreateImageGridPainter(kLogoutButtonNormalImages)); 94 views::Painter::CreateImageGridPainter(kLogoutButtonNormalImages));
94 border->SetPainter(false, views::Button::STATE_PRESSED, 95 border->SetPainter(false, views::Button::STATE_PRESSED,
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 void LogoutButtonTray::UpdateVisibility() { 225 void LogoutButtonTray::UpdateVisibility() {
225 SetVisible(show_logout_button_in_tray_ && 226 SetVisible(show_logout_button_in_tray_ &&
226 login_status_ != user::LOGGED_IN_NONE && 227 login_status_ != user::LOGGED_IN_NONE &&
227 login_status_ != user::LOGGED_IN_LOCKED); 228 login_status_ != user::LOGGED_IN_LOCKED);
228 if (!show_logout_button_in_tray_) 229 if (!show_logout_button_in_tray_)
229 EnsureConfirmationDialogIsClosed(); 230 EnsureConfirmationDialogIsClosed();
230 } 231 }
231 232
232 } // namespace internal 233 } // namespace internal
233 } // namespace ash 234 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698