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

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

Issue 14118013: Restrict the new button style to the new dialog style flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index bbad84c6ece39d4fc57a68af103acc5baa005efd..7587156b14af044e4daa57edba3a59ed36b07670 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -11,6 +11,7 @@
#include "ui/native_theme/native_theme.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/focus_border.h"
+#include "ui/views/window/dialog_delegate.h"
#if defined(OS_WIN)
#include "ui/gfx/color_utils.h"
@@ -132,7 +133,7 @@ void LabelButton::SetIsDefault(bool is_default) {
void LabelButton::SetStyle(ButtonStyle style) {
// Use the new button style instead of the native button style.
// TODO(msw): Officialy deprecate and remove STYLE_NATIVE_TEXTBUTTON.
- if (style == STYLE_NATIVE_TEXTBUTTON)
+ if (DialogDelegate::UseNewStyle() && style == STYLE_NATIVE_TEXTBUTTON)
style = STYLE_BUTTON;
style_ = style;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698