OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/autofill/autofill_dialog_views.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 // We have to do this instead of using set_border() because a border | 506 // We have to do this instead of using set_border() because a border |
507 // is being used to draw the check square. | 507 // is being used to draw the check square. |
508 static_cast<views::CheckboxNativeThemeBorder*>(checkbox->border())-> | 508 static_cast<views::CheckboxNativeThemeBorder*>(checkbox->border())-> |
509 SetCustomInsets(gfx::Insets(kNotificationPadding, | 509 SetCustomInsets(gfx::Insets(kNotificationPadding, |
510 kNotificationPadding, | 510 kNotificationPadding, |
511 kNotificationPadding, | 511 kNotificationPadding, |
512 kNotificationPadding)); | 512 kNotificationPadding)); |
513 if (!notification.interactive()) | 513 if (!notification.interactive()) |
514 checkbox->SetState(views::Button::STATE_DISABLED); | 514 checkbox->SetState(views::Button::STATE_DISABLED); |
515 checkbox->SetText(notification.display_text()); | 515 checkbox->SetText(notification.display_text()); |
516 checkbox->SetMultiLine(true); | 516 checkbox->SetTextMultiLine(true); |
517 checkbox->set_alignment(views::TextButtonBase::ALIGN_LEFT); | 517 checkbox->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
518 checkbox->SetEnabledColor(notification.GetTextColor()); | 518 checkbox->SetTextColor(views::Button::STATE_NORMAL, |
519 checkbox->SetHoverColor(notification.GetTextColor()); | 519 notification.GetTextColor()); |
| 520 checkbox->SetTextColor(views::Button::STATE_HOVERED, |
| 521 notification.GetTextColor()); |
520 checkbox->SetChecked(notification.checked()); | 522 checkbox->SetChecked(notification.checked()); |
521 checkbox->set_listener(this); | 523 checkbox->set_listener(this); |
522 view.reset(checkbox.release()); | 524 view.reset(checkbox.release()); |
523 } else { | 525 } else { |
524 scoped_ptr<views::Label> label(new views::Label()); | 526 scoped_ptr<views::Label> label(new views::Label()); |
525 label->SetText(notification.display_text()); | 527 label->SetText(notification.display_text()); |
526 label->SetMultiLine(true); | 528 label->SetMultiLine(true); |
527 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 529 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
528 label->SetAutoColorReadabilityEnabled(false); | 530 label->SetAutoColorReadabilityEnabled(false); |
529 label->SetEnabledColor(notification.GetTextColor()); | 531 label->SetEnabledColor(notification.GetTextColor()); |
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 1796 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
1795 : section(section), | 1797 : section(section), |
1796 container(NULL), | 1798 container(NULL), |
1797 manual_input(NULL), | 1799 manual_input(NULL), |
1798 suggested_info(NULL), | 1800 suggested_info(NULL), |
1799 suggested_button(NULL) {} | 1801 suggested_button(NULL) {} |
1800 | 1802 |
1801 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 1803 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
1802 | 1804 |
1803 } // namespace autofill | 1805 } // namespace autofill |
OLD | NEW |