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

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: rm dcheck 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d2a9d72794ed95887ebdd59c730e009057122ad6..edd5c2fd5c879e7e7f5c256872d373731261f8ea 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698