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

Unified Diff: ui/views/window/dialog_client_view.cc

Issue 2361063002: MdTextButton: get rid of distinct "default" styling and make all (Closed)
Patch Set: Created 4 years, 3 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 fb92712b4bf8ef971ccacde94dafb459df39fe83..ce9099fb3931760943a25b2c403845c99979f70e 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -314,9 +314,11 @@ void DialogClientView::ChildVisibilityChanged(View* child) {
LabelButton* DialogClientView::CreateDialogButton(ui::DialogButton type) {
const base::string16 title = GetDialogDelegate()->GetDialogButtonLabel(type);
LabelButton* button = nullptr;
+ // The default button is always blue in Harmony.
if (GetDialogDelegate()->GetDefaultDialogButton() == type &&
- GetDialogDelegate()->ShouldDefaultButtonBeBlue()) {
- return MdTextButton::CreateSecondaryUiBlueButton(this, title);
+ (ui::MaterialDesignController::IsSecondaryUiMaterial() ||
+ GetDialogDelegate()->ShouldDefaultButtonBeBlue())) {
+ button = MdTextButton::CreateSecondaryUiBlueButton(this, title);
} else {
button = MdTextButton::CreateSecondaryUiButton(this, title);
}
« 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