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

Unified Diff: ui/views/window/dialog_client_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
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_client_view.cc
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index 358c81c39120b8afa346769ccd0d77a8c3ee1bc2..ec7794cb34df9d3f55db2c4805af877fd9628652 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -306,17 +306,10 @@ LabelButton* DialogClientView::CreateDialogButton(ui::DialogButton type) {
if (GetDialogDelegate()->UseNewStyleForThisDialog() &&
GetDialogDelegate()->GetDefaultDialogButton() == type &&
GetDialogDelegate()->ShouldDefaultButtonBeBlue()) {
- if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
- MdTextButton* md_button = MdTextButton::CreateMdButton(this, title);
- md_button->SetCallToAction(MdTextButton::STRONG_CALL_TO_ACTION);
- button = md_button;
- } else {
- button = new BlueButton(this, title);
- }
+ return MdTextButton::CreateSecondaryUiBlueButton(this, title);
} else {
button = MdTextButton::CreateSecondaryUiButton(this, title);
}
- Button::ConfigureDefaultFocus(button);
const int kDialogMinButtonWidth = 75;
button->SetMinSize(gfx::Size(kDialogMinButtonWidth, 0));
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698