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

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

Issue 12304038: Restore 'Chrome Style' buttons for --enable-new-dialog-style dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/window/dialog_client_view.cc
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index 94d1aebefe5de04dc7ab918c67134f46286c7762..6897f08d2cc2c8436f7cc2eea8df53b096082e8a 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "ui/base/keycodes/keyboard_codes.h"
+#include "ui/views/controls/button/chrome_style.h"
#include "ui/views/controls/button/text_button.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
@@ -289,10 +290,12 @@ void DialogClientView::CreateDialogButtons() {
TextButton* DialogClientView::CreateDialogButton(ui::DialogButton type) {
const string16 title = GetDialogDelegate()->GetDialogButtonLabel(type);
TextButton* button = NULL;
- if (DialogDelegate::UseNewStyle())
+ if (DialogDelegate::UseNewStyle()) {
button = new TextButton(this, title);
- else
+ ApplyChromeStyle(button);
+ } else {
button = new NativeTextButton(this, title);
+ }
const int kDialogMinButtonWidth = 75;
button->set_min_width(kDialogMinButtonWidth);
button->SetGroup(kButtonGroup);
« 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