OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_controller.h" | 5 #include "chrome/browser/chromeos/login/user_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 } else { | 480 } else { |
481 DCHECK(type == WM_IPC_WINDOW_LOGIN_UNSELECTED_LABEL); | 481 DCHECK(type == WM_IPC_WINDOW_LOGIN_UNSELECTED_LABEL); |
482 // TODO(altimofeev): switch to the rounded username view. | 482 // TODO(altimofeev): switch to the rounded username view. |
483 label = UsernameView::CreateShapedUsernameView( | 483 label = UsernameView::CreateShapedUsernameView( |
484 UTF16ToWideHack(text), true); | 484 UTF16ToWideHack(text), true); |
485 } | 485 } |
486 | 486 |
487 const gfx::Font& font = (type == WM_IPC_WINDOW_LOGIN_LABEL) ? | 487 const gfx::Font& font = (type == WM_IPC_WINDOW_LOGIN_LABEL) ? |
488 GetLabelFont() : GetUnselectedLabelFont(); | 488 GetLabelFont() : GetUnselectedLabelFont(); |
489 label->SetFont(font); | 489 label->SetFont(font); |
490 label->SetColor(login::kTextColor); | 490 label->SetAutoColorReadabilityEnabled(false); |
| 491 label->SetEnabledColor(login::kTextColor); |
491 | 492 |
492 if (type == WM_IPC_WINDOW_LOGIN_LABEL) | 493 if (type == WM_IPC_WINDOW_LOGIN_LABEL) |
493 label_view_ = label; | 494 label_view_ = label; |
494 else | 495 else |
495 unselected_label_view_ = label; | 496 unselected_label_view_ = label; |
496 | 497 |
497 int width = (type == WM_IPC_WINDOW_LOGIN_LABEL) ? | 498 int width = (type == WM_IPC_WINDOW_LOGIN_LABEL) ? |
498 kUserImageSize : kUnselectedSize; | 499 kUserImageSize : kUnselectedSize; |
499 if (is_new_user_) { | 500 if (is_new_user_) { |
500 // Make label as small as possible to don't show tooltip. | 501 // Make label as small as possible to don't show tooltip. |
(...skipping 22 matching lines...) Expand all Loading... |
523 string16 UserController::GetNameTooltip() const { | 524 string16 UserController::GetNameTooltip() const { |
524 if (is_new_user_) | 525 if (is_new_user_) |
525 return l10n_util::GetStringUTF16(IDS_ADD_USER); | 526 return l10n_util::GetStringUTF16(IDS_ADD_USER); |
526 else if (is_guest_) | 527 else if (is_guest_) |
527 return l10n_util::GetStringUTF16(IDS_GO_INCOGNITO_BUTTON); | 528 return l10n_util::GetStringUTF16(IDS_GO_INCOGNITO_BUTTON); |
528 else | 529 else |
529 return UTF8ToUTF16(user_.GetNameTooltip()); | 530 return UTF8ToUTF16(user_.GetNameTooltip()); |
530 } | 531 } |
531 | 532 |
532 } // namespace chromeos | 533 } // namespace chromeos |
OLD | NEW |