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

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

Issue 2922263002: Fix style of profile error dialog. (Closed)
Patch Set: tapted's and pkasting's comments 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..43c0b48be5ab7345b338ce94d0e3327d70b34280 100644
--- a/ui/views/controls/button/md_text_button.cc
+++ b/ui/views/controls/button/md_text_button.cc
@@ -28,6 +28,14 @@ namespace views {
namespace {
+bool UseMaterialSecondaryButtons() {
+#if defined(OS_MACOSX)
+ return true;
+#else
+ return ui::MaterialDesignController::IsSecondaryUiMaterial();
+#endif // defined(OS_MACOSX)
+}
+
LabelButton* CreateButton(ButtonListener* listener,
const base::string16& text,
bool md) {
@@ -44,15 +52,14 @@ LabelButton* CreateButton(ButtonListener* listener,
// static
LabelButton* MdTextButton::CreateSecondaryUiButton(ButtonListener* listener,
const base::string16& text) {
- return CreateButton(listener, text,
- ui::MaterialDesignController::IsSecondaryUiMaterial());
+ return CreateButton(listener, text, UseMaterialSecondaryButtons());
}
// static
LabelButton* MdTextButton::CreateSecondaryUiBlueButton(
ButtonListener* listener,
const base::string16& text) {
- if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
+ if (UseMaterialSecondaryButtons()) {
MdTextButton* md_button =
MdTextButton::Create(listener, text, style::CONTEXT_BUTTON_MD);
md_button->SetProminent(true);
« 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