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

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

Issue 1770573002: Update extension buttons to Material Design (Mac). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md_toolbar
Patch Set: Code clean-up. 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/cocoa/toolbar/toolbar_controller.mm ('k') | no next file » | 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 11 matching lines...) Expand all
22 const int kOmniboxDropdownBorderInterior[] = {6, 0, 0}; 22 const int kOmniboxDropdownBorderInterior[] = {6, 0, 0};
23 const int kOmniboxFontPixelSize[] = {16, 14, 14}; 23 const int kOmniboxFontPixelSize[] = {16, 14, 14};
24 const int kTabCloseButtonTrailingPaddingOverlap[] = {2, 0, 0}; 24 const int kTabCloseButtonTrailingPaddingOverlap[] = {2, 0, 0};
25 const int kTabFaviconTitleSpacing[] = {4, 6, 6}; 25 const int kTabFaviconTitleSpacing[] = {4, 6, 6};
26 const int kTabHeight[] = {29, 29, 33}; 26 const int kTabHeight[] = {29, 29, 33};
27 const int kTabPinnedContentWidth[] = {25, 23, 23}; 27 const int kTabPinnedContentWidth[] = {25, 23, 23};
28 #if defined(OS_MACOSX) 28 #if defined(OS_MACOSX)
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 #else 33 #else
33 const int kTabTopExclusionHeight[] = {2, 0, 0}; 34 const int kTabTopExclusionHeight[] = {2, 0, 0};
34 const int kTabstripNewTabButtonOverlap[] = {11, 5, 6}; 35 const int kTabstripNewTabButtonOverlap[] = {11, 5, 6};
35 const int kTabstripTabOverlap[] = {26, 16, 16}; 36 const int kTabstripTabOverlap[] = {26, 16, 16};
37 const int kToolbarStandardSpacing[] = {3, 4, 8};
36 #endif 38 #endif
37 const int kTabstripToolbarOverlap[] = {3, 0, 0}; 39 const int kTabstripToolbarOverlap[] = {3, 0, 0};
38 const int kToolbarContentShadowHeight[] = {0, 0, 0}; 40 const int kToolbarContentShadowHeight[] = {0, 0, 0};
39 const int kToolbarContentShadowHeightAsh[] = {2, 0, 0}; 41 const int kToolbarContentShadowHeightAsh[] = {2, 0, 0};
40 const int kToolbarElementPadding[] = {0, 0, 8}; 42 const int kToolbarElementPadding[] = {0, 0, 8};
41 const int kToolbarLocationBarRightPadding[] = {0, 4, 8}; 43 const int kToolbarLocationBarRightPadding[] = {0, 4, 8};
42 const int kToolbarStandardSpacing[] = {3, 4, 8};
43 44
44 const int mode = ui::MaterialDesignController::GetMode(); 45 const int mode = ui::MaterialDesignController::GetMode();
45 switch (constant) { 46 switch (constant) {
46 case FIND_BAR_TOOLBAR_OVERLAP: 47 case FIND_BAR_TOOLBAR_OVERLAP:
47 return kFindBarVerticalOffset[mode]; 48 return kFindBarVerticalOffset[mode];
48 case ICON_LABEL_VIEW_INTERNAL_PADDING: 49 case ICON_LABEL_VIEW_INTERNAL_PADDING:
49 return kIconLabelViewInternalPadding[mode]; 50 return kIconLabelViewInternalPadding[mode];
50 case ICON_LABEL_VIEW_TRAILING_PADDING: 51 case ICON_LABEL_VIEW_TRAILING_PADDING:
51 return kIconLabelViewTrailingPadding[mode]; 52 return kIconLabelViewTrailingPadding[mode];
52 case LOCATION_BAR_BORDER_THICKNESS: 53 case LOCATION_BAR_BORDER_THICKNESS:
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const int kNewTabButtonHeight[] = {18, 18, 21}; 154 const int kNewTabButtonHeight[] = {18, 18, 21};
154 155
155 const int mode = ui::MaterialDesignController::GetMode(); 156 const int mode = ui::MaterialDesignController::GetMode();
156 switch (size) { 157 switch (size) {
157 case NEW_TAB_BUTTON: 158 case NEW_TAB_BUTTON:
158 return gfx::Size(kNewTabButtonWidth[mode], kNewTabButtonHeight[mode]); 159 return gfx::Size(kNewTabButtonWidth[mode], kNewTabButtonHeight[mode]);
159 } 160 }
160 NOTREACHED(); 161 NOTREACHED();
161 return gfx::Size(); 162 return gfx::Size();
162 } 163 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698