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

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

Issue 2942453002: Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: Address redness 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
Index: ui/views/layout/layout_provider.cc
diff --git a/ui/views/layout/layout_provider.cc b/ui/views/layout/layout_provider.cc
index a4fd678c3f1db896b7db9617022cdfc8eb7df864..422b9f15642840fb13d31b02a11acfefd9c1acf3 100644
--- a/ui/views/layout/layout_provider.cc
+++ b/ui/views/layout/layout_provider.cc
@@ -7,14 +7,52 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "ui/base/material_design/material_design_controller.h"
-#include "ui/views/layout/layout_constants.h"
#include "ui/views/views_delegate.h"
namespace views {
namespace {
+
LayoutProvider* g_layout_delegate = nullptr;
-}
+
+constexpr int kPanelHorizMargin = 13;
Peter Kasting 2017/06/13 23:33:35 Same comment.
ananta 2017/06/14 18:48:11 Done.
+
+// Top or bottom margin.
+constexpr int kPanelVertMargin = 13;
+
+// Horizontal spacing between controls that are logically related.
+constexpr int kRelatedControlHorizontalSpacing = 8;
+
+// Vertical spacing between controls that are logically related.
+constexpr int kRelatedControlVerticalSpacing = 8;
+
+// Vertical spacing between controls that are logically unrelated.
+constexpr int kUnrelatedControlVerticalSpacing = 20;
+
+// Vertical spacing between the edge of the window and the
+// top or bottom of a button (when using new style dialogs).
+constexpr int kButtonVEdgeMarginNew = 20;
+
+// Horizontal spacing between the edge of the window and the
+// left or right of a button (when using new style dialogs).
+constexpr int kButtonHEdgeMarginNew = 20;
+
+// Spacing between the edge of the window and the edge of the close button.
+constexpr int kCloseButtonMargin = 7;
+
+// Horizontal spacing between buttons that are logically related.
+constexpr int kRelatedButtonHSpacing = 6;
+
+// Padding on the left and right of a button's contents.
+const int kButtonHorizontalPadding = 16;
+
+// Minimum width of dialog buttons.
+constexpr int kDialogMinimumButtonWidth = 75;
+
+// Extra space around vector buttons to increase their event target size.
+constexpr int kVectorButtonExtraTouchSize = 4;
+
+} // namespace
LayoutProvider::LayoutProvider() {
g_layout_delegate = this;

Powered by Google App Engine
This is Rietveld 408576698