OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/login/user_view.h" | 5 #include "chrome/browser/chromeos/login/user_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/login/helper.h" | 9 #include "chrome/browser/chromeos/login/helper.h" |
10 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 10 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
11 #include "chrome/browser/chromeos/login/rounded_view.h" | 11 #include "chrome/browser/chromeos/login/rounded_view.h" |
| 12 #include "chrome/browser/chromeos/view_ids.h" |
12 #include "gfx/canvas.h" | 13 #include "gfx/canvas.h" |
13 #include "gfx/canvas_skia.h" | 14 #include "gfx/canvas_skia.h" |
14 #include "gfx/gtk_util.h" | 15 #include "gfx/gtk_util.h" |
15 #include "gfx/rect.h" | 16 #include "gfx/rect.h" |
16 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
17 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
18 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
19 #include "views/background.h" | 20 #include "views/background.h" |
20 #include "views/controls/button/text_button.h" | 21 #include "views/controls/button/text_button.h" |
21 #include "views/controls/image_view.h" | 22 #include "views/controls/image_view.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_ACTIVE_USER))); | 80 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_ACTIVE_USER))); |
80 active_user_label_->SetFont(font); | 81 active_user_label_->SetFont(font); |
81 active_user_label_->SetColor(kTextColor); | 82 active_user_label_->SetColor(kTextColor); |
82 | 83 |
83 signout_link_ = new views::Link( | 84 signout_link_ = new views::Link( |
84 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_SIGN_OUT))); | 85 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_SIGN_OUT))); |
85 signout_link_->SetController(link_controller); | 86 signout_link_->SetController(link_controller); |
86 signout_link_->SetFont(font); | 87 signout_link_->SetFont(font); |
87 signout_link_->SetColor(kTextColor); | 88 signout_link_->SetColor(kTextColor); |
88 signout_link_->SetFocusable(true); | 89 signout_link_->SetFocusable(true); |
| 90 signout_link_->SetHighlightedColor(kTextColor); |
| 91 signout_link_->SetDisabledColor(kTextColor); |
| 92 signout_link_->SetNormalColor(kTextColor); |
| 93 signout_link_->SetID(VIEW_ID_SCREEN_LOCKER_SIGNOUT_LINK); |
89 | 94 |
90 AddChildView(active_user_label_); | 95 AddChildView(active_user_label_); |
91 AddChildView(signout_link_); | 96 AddChildView(signout_link_); |
92 | 97 |
93 set_background(views::Background::CreateBackgroundPainter( | 98 set_background(views::Background::CreateBackgroundPainter( |
94 true, new SignoutBackgroundPainter())); | 99 true, new SignoutBackgroundPainter())); |
95 } | 100 } |
96 | 101 |
97 // views::View overrides. | 102 // views::View overrides. |
98 virtual void Layout() { | 103 virtual void Layout() { |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 if (remove_button_ == sender) | 339 if (remove_button_ == sender) |
335 delegate_->OnRemoveUser(); | 340 delegate_->OnRemoveUser(); |
336 } | 341 } |
337 | 342 |
338 void UserView::OnLocaleChanged() { | 343 void UserView::OnLocaleChanged() { |
339 remove_button_->SetText( | 344 remove_button_->SetText( |
340 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE))); | 345 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE))); |
341 } | 346 } |
342 | 347 |
343 } // namespace chromeos | 348 } // namespace chromeos |
OLD | NEW |