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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 15061006: views: Switch Checkbox over to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disabled images Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/autofill/autofill_dialog_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 0e086591a3bb1338523a94508a3cf338a2bd6fea..a6f13fbe62697f2932a4e63bf6ff0709dbcb7613 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -33,6 +33,7 @@
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/label_button.h"
+#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/controls/combobox/combobox.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
@@ -505,18 +506,20 @@ void AutofillDialogViews::NotificationArea::SetNotifications(
checkbox_ = checkbox.get();
// We have to do this instead of using set_border() because a border
// is being used to draw the check square.
- static_cast<views::CheckboxNativeThemeBorder*>(checkbox->border())->
- SetCustomInsets(gfx::Insets(kNotificationPadding,
- kNotificationPadding,
- kNotificationPadding,
- kNotificationPadding));
+ static_cast<views::LabelButtonBorder*>(checkbox->border())->
+ set_insets(gfx::Insets(kNotificationPadding,
+ kNotificationPadding,
+ kNotificationPadding,
+ kNotificationPadding));
if (!notification.interactive())
checkbox->SetState(views::Button::STATE_DISABLED);
checkbox->SetText(notification.display_text());
- checkbox->SetMultiLine(true);
- checkbox->set_alignment(views::TextButtonBase::ALIGN_LEFT);
- checkbox->SetEnabledColor(notification.GetTextColor());
- checkbox->SetHoverColor(notification.GetTextColor());
+ checkbox->SetTextMultiLine(true);
+ checkbox->SetHorizontalAlignment(gfx::ALIGN_LEFT);
+ checkbox->SetTextColor(views::Button::STATE_NORMAL,
+ notification.GetTextColor());
+ checkbox->SetTextColor(views::Button::STATE_HOVERED,
+ notification.GetTextColor());
checkbox->SetChecked(notification.checked());
checkbox->set_listener(this);
view.reset(checkbox.release());
« no previous file with comments | « no previous file | chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc » ('j') | ui/views/controls/button/checkbox.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698