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

Unified Diff: chrome/browser/first_run/try_chrome_dialog_view.cc

Issue 1978403003: [MD] Eliminate as many SetStyle(STYLE_BUTTON) calls as possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/first_run/try_chrome_dialog_view.cc
diff --git a/chrome/browser/first_run/try_chrome_dialog_view.cc b/chrome/browser/first_run/try_chrome_dialog_view.cc
index 198c3365615e6014c0796bff35efb6682569e704..da3f29ce4830eaa4147b99486ee7bf92417959c3 100644
--- a/chrome/browser/first_run/try_chrome_dialog_view.cc
+++ b/chrome/browser/first_run/try_chrome_dialog_view.cc
@@ -26,7 +26,7 @@
#include "ui/views/background.h"
#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/md_text_button.h"
#include "ui/views/controls/button/radio_button.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/link.h"
@@ -221,9 +221,9 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal(
layout->AddView(kill_chrome_);
}
- views::LabelButton* accept_button = new views::LabelButton(
- this, l10n_util::GetStringUTF16(IDS_OK));
- accept_button->SetStyle(views::Button::STYLE_BUTTON);
+ views::LabelButton* accept_button =
+ views::MdTextButton::CreateSecondaryUiButton(
+ this, l10n_util::GetStringUTF16(IDS_OK));
accept_button->set_tag(BT_OK_BUTTON);
views::Separator* separator = NULL;
@@ -250,9 +250,9 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal(
if (dont_bug_me_button) {
// The dialog needs a "Don't bug me" as a button or as a radio button,
// this the button case.
- views::LabelButton* cancel_button = new views::LabelButton(
- this, l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL));
- cancel_button->SetStyle(views::Button::STYLE_BUTTON);
+ views::LabelButton* cancel_button =
+ views::MdTextButton::CreateSecondaryUiButton(
+ this, l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL));
cancel_button->set_tag(BT_CLOSE_BUTTON);
layout->AddView(cancel_button);
}

Powered by Google App Engine
This is Rietveld 408576698