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

Side by Side Diff: chrome/browser/ui/layout_constants.cc

Issue 1781593005: Fix regression in dragging location bar right edge (Mac). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md_extensions_buttons
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/layout_constants.h ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/layout_constants.h" 5 #include "chrome/browser/ui/layout_constants.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/base/material_design/material_design_controller.h" 9 #include "ui/base/material_design/material_design_controller.h"
10 10
(...skipping 18 matching lines...) Expand all
29 const int kTabTopExclusionHeight[] = {0, 0, 0}; 29 const int kTabTopExclusionHeight[] = {0, 0, 0};
30 const int kTabstripNewTabButtonOverlap[] = {8, 5, 6}; 30 const int kTabstripNewTabButtonOverlap[] = {8, 5, 6};
31 const int kTabstripTabOverlap[] = {19, 16, 16}; 31 const int kTabstripTabOverlap[] = {19, 16, 16};
32 const int kToolbarStandardSpacing[] = {3, 0, 8}; 32 const int kToolbarStandardSpacing[] = {3, 0, 8};
33 #else 33 #else
34 const int kTabTopExclusionHeight[] = {2, 0, 0}; 34 const int kTabTopExclusionHeight[] = {2, 0, 0};
35 const int kTabstripNewTabButtonOverlap[] = {11, 5, 6}; 35 const int kTabstripNewTabButtonOverlap[] = {11, 5, 6};
36 const int kTabstripTabOverlap[] = {26, 16, 16}; 36 const int kTabstripTabOverlap[] = {26, 16, 16};
37 const int kToolbarStandardSpacing[] = {3, 4, 8}; 37 const int kToolbarStandardSpacing[] = {3, 4, 8};
38 #endif 38 #endif
39 const int kToolbarActionsLeftPadding[] = {3, 4, 8};
40 const int kToolbarActionsRightPadding[] = {3, 4, 8};
39 const int kTabstripToolbarOverlap[] = {3, 0, 0}; 41 const int kTabstripToolbarOverlap[] = {3, 0, 0};
40 const int kToolbarContentShadowHeight[] = {0, 0, 0}; 42 const int kToolbarContentShadowHeight[] = {0, 0, 0};
41 const int kToolbarContentShadowHeightAsh[] = {2, 0, 0}; 43 const int kToolbarContentShadowHeightAsh[] = {2, 0, 0};
42 const int kToolbarElementPadding[] = {0, 0, 8}; 44 const int kToolbarElementPadding[] = {0, 0, 8};
43 const int kToolbarLocationBarRightPadding[] = {0, 4, 8}; 45 const int kToolbarLocationBarRightPadding[] = {0, 4, 8};
44 46
45 const int mode = ui::MaterialDesignController::GetMode(); 47 const int mode = ui::MaterialDesignController::GetMode();
46 switch (constant) { 48 switch (constant) {
47 case FIND_BAR_TOOLBAR_OVERLAP: 49 case FIND_BAR_TOOLBAR_OVERLAP:
48 return kFindBarVerticalOffset[mode]; 50 return kFindBarVerticalOffset[mode];
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 case TOOLBAR_CONTENT_SHADOW_HEIGHT: 89 case TOOLBAR_CONTENT_SHADOW_HEIGHT:
88 return kToolbarContentShadowHeight[mode]; 90 return kToolbarContentShadowHeight[mode];
89 case TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH: 91 case TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH:
90 return kToolbarContentShadowHeightAsh[mode]; 92 return kToolbarContentShadowHeightAsh[mode];
91 case TOOLBAR_ELEMENT_PADDING: 93 case TOOLBAR_ELEMENT_PADDING:
92 return kToolbarElementPadding[mode]; 94 return kToolbarElementPadding[mode];
93 case TOOLBAR_LOCATION_BAR_RIGHT_PADDING: 95 case TOOLBAR_LOCATION_BAR_RIGHT_PADDING:
94 return kToolbarLocationBarRightPadding[mode]; 96 return kToolbarLocationBarRightPadding[mode];
95 case TOOLBAR_STANDARD_SPACING: 97 case TOOLBAR_STANDARD_SPACING:
96 return kToolbarStandardSpacing[mode]; 98 return kToolbarStandardSpacing[mode];
99 case TOOLBAR_ACTIONS_LEFT_PADDING:
100 return kToolbarActionsLeftPadding[mode];
101 case TOOLBAR_ACTIONS_RIGHT_PADDING:
102 return kToolbarActionsRightPadding[mode];
97 } 103 }
98 NOTREACHED(); 104 NOTREACHED();
99 return 0; 105 return 0;
100 } 106 }
101 107
102 gfx::Insets GetLayoutInsets(LayoutInset inset) { 108 gfx::Insets GetLayoutInsets(LayoutInset inset) {
103 const int kAvatarLeftPadding[] = {2, 4, 4}; 109 const int kAvatarLeftPadding[] = {2, 4, 4};
104 const int kAvatarRightPadding[] = {-6, 4, 4}; 110 const int kAvatarRightPadding[] = {-6, 4, 4};
105 const int kAvatarBottomPadding[] = {2, 4, 4}; 111 const int kAvatarBottomPadding[] = {2, 4, 4};
106 const int kOmniboxDropdownIconPadding[] = {2, 4, 8}; 112 const int kOmniboxDropdownIconPadding[] = {2, 4, 8};
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const int kNewTabButtonHeight[] = {18, 18, 21}; 160 const int kNewTabButtonHeight[] = {18, 18, 21};
155 161
156 const int mode = ui::MaterialDesignController::GetMode(); 162 const int mode = ui::MaterialDesignController::GetMode();
157 switch (size) { 163 switch (size) {
158 case NEW_TAB_BUTTON: 164 case NEW_TAB_BUTTON:
159 return gfx::Size(kNewTabButtonWidth[mode], kNewTabButtonHeight[mode]); 165 return gfx::Size(kNewTabButtonWidth[mode], kNewTabButtonHeight[mode]);
160 } 166 }
161 NOTREACHED(); 167 NOTREACHED();
162 return gfx::Size(); 168 return gfx::Size();
163 } 169 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/layout_constants.h ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698