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

Unified Diff: ui/views/layout/grid_layout.cc

Issue 13925019: fix GridLayout::CreatePanel for new style dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove instance of CreatePanel that doesn't seem to serve any purpose 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
Index: ui/views/layout/grid_layout.cc
diff --git a/ui/views/layout/grid_layout.cc b/ui/views/layout/grid_layout.cc
index ae8ba02e46ec9c0e7c167e2d5366d014b47ec82a..a5f308bcfab9d9e6e44cb99e4c53e24c2a16988b 100644
--- a/ui/views/layout/grid_layout.cc
+++ b/ui/views/layout/grid_layout.cc
@@ -11,6 +11,7 @@
#include "ui/gfx/insets.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/view.h"
+#include "ui/views/window/dialog_delegate.h"
namespace views {
@@ -675,8 +676,12 @@ GridLayout::~GridLayout() {
// static
GridLayout* GridLayout::CreatePanel(View* host) {
GridLayout* layout = new GridLayout(host);
- layout->SetInsets(kPanelVertMargin, kPanelHorizMargin,
- kPanelVertMargin, kPanelHorizMargin);
+
+ int horizontal_margin = DialogDelegate::UseNewStyle() ?
msw 2013/04/15 22:48:37 I'm don't think we should change the default GridL
Evan Stade 2013/04/15 23:52:53 this is not for all GridLayouts. It's only for "pa
msw 2013/04/16 00:53:21 Ah, I didn't realize that. Then this seems reasona
+ kPanelHorizMarginNewStyle : kPanelHorizMargin;
+
+ layout->SetInsets(kPanelVertMargin, horizontal_margin,
+ kPanelVertMargin, horizontal_margin);
return layout;
}

Powered by Google App Engine
This is Rietveld 408576698