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

Side by Side Diff: ui/views/layout/layout_delegate.cc

Issue 2485083003: views: add layout delegates (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/views/layout/layout_constants.h"
6 #include "ui/views/layout/layout_delegate.h"
7
8 namespace views {
9
10 int LayoutDelegate::GetLayoutDistance(LayoutDistanceType type) const {
11 switch (type) {
12 case PANEL_VERT_MARGIN:
13 return kPanelVertMargin;
14 case RELATED_BUTTON_HORIZONTAL_SPACING:
15 return kRelatedButtonHSpacing;
16 case RELATED_CONTROL_HORIZONTAL_SPACING:
17 return kRelatedControlHorizontalSpacing;
18 case RELATED_CONTROL_VERTICAL_SPACING:
19 return kRelatedControlVerticalSpacing;
20 case UNRELATED_CONTROL_VERTICAL_SPACING:
21 return kUnrelatedControlVerticalSpacing;
22 case UNRELATED_CONTROL_LARGE_VERTICAL_SPACING:
23 return kUnrelatedControlLargeVerticalSpacing;
24 case BUTTON_VEDGE_MARGIN_NEW:
25 return kButtonVEdgeMarginNew;
26 case BUTTON_HEDGE_MARGIN_NEW:
27 return kButtonHEdgeMarginNew;
28 }
29 return 0;
30 }
31
32 GridLayout::Alignment LayoutDelegate::GetControlLabelGridAlignment() const {
33 return kControlLabelGridAlignment;
34 }
35
36 bool LayoutDelegate::UseExtraDialogPadding() const {
37 return true;
38 }
39
40 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698