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

Unified Diff: ui/views/controls/button/md_text_button.cc

Issue 2922263002: Fix style of profile error dialog. (Closed)
Patch Set: Avoid duplication Created 3 years, 6 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/base/models/dialog_model.h ('k') | ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/md_text_button.cc
diff --git a/ui/views/controls/button/md_text_button.cc b/ui/views/controls/button/md_text_button.cc
index 55159d86e9a5151b6f50fa33479d8afe47119bd7..f5cf36851f3f9cfb659ad3e346725e68fa5e3699 100644
--- a/ui/views/controls/button/md_text_button.cc
+++ b/ui/views/controls/button/md_text_button.cc
@@ -31,12 +31,16 @@ namespace {
LabelButton* CreateButton(ButtonListener* listener,
const base::string16& text,
bool md) {
+#if !defined(OS_MACOSX)
if (md)
+#endif // !defined(OS_MACOSX)
tapted 2017/06/09 01:43:48 I try to avoid #ifdefs intertwining with branching
Peter Kasting 2017/06/09 02:21:47 This, but I would call it UseMaterialSecondaryButt
afakhry 2017/06/09 17:32:10 Done.
afakhry 2017/06/09 17:32:10 Done.
return MdTextButton::Create(listener, text, style::CONTEXT_BUTTON_MD);
+#if !defined(OS_MACOSX)
LabelButton* button = new LabelButton(listener, text, style::CONTEXT_BUTTON);
button->SetStyleDeprecated(CustomButton::STYLE_BUTTON);
return button;
+#endif // !defined(OS_MACOSX)
}
} // namespace
@@ -52,14 +56,18 @@ LabelButton* MdTextButton::CreateSecondaryUiButton(ButtonListener* listener,
LabelButton* MdTextButton::CreateSecondaryUiBlueButton(
ButtonListener* listener,
const base::string16& text) {
+#if !defined(OS_MACOSX)
if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
tapted 2017/06/09 01:43:48 also here. Then remove all the #if.
afakhry 2017/06/09 17:32:10 Done.
+#endif // !defined(OS_MACOSX)
MdTextButton* md_button =
MdTextButton::Create(listener, text, style::CONTEXT_BUTTON_MD);
md_button->SetProminent(true);
return md_button;
+#if !defined(OS_MACOSX)
}
return new BlueButton(listener, text);
+#endif // !defined(OS_MACOSX)
}
// static
« no previous file with comments | « ui/base/models/dialog_model.h ('k') | ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698