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

Unified Diff: chrome/browser/ui/layout_constants.cc

Issue 2464063002: Revert of Some more pre-material cleanups (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/layout_constants.h ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/layout_constants.cc
diff --git a/chrome/browser/ui/layout_constants.cc b/chrome/browser/ui/layout_constants.cc
index d7057014bc2c6cea2c8b0c552361c1aa878fa695..20ad07c4b2cc5e8371d2896487bb01d2c5e5a985 100644
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -9,23 +9,29 @@
#include "ui/base/material_design/material_design_controller.h"
int GetLayoutConstant(LayoutConstant constant) {
- const int kFindBarVerticalOffset[] = {6, 6};
- const int kLocationBarBorderThickness[] = {1, 1};
- const int kLocationBarBubbleFontVerticalPadding[] = {2, 4};
- const int kLocationBarBubbleVerticalPadding[] = {3, 3};
- const int kLocationBarBubbleAnchorVerticalInset[] = {6, 8};
- const int kLocationBarHeight[] = {28, 32};
- const int kLocationBarHorizontalPadding[] = {6, 6};
- const int kLocationBarVerticalPadding[] = {1, 1};
- const int kOmniboxFontPixelSize[] = {14, 14};
- const int kTabFaviconTitleSpacing[] = {6, 6};
- const int kTabHeight[] = {29, 33};
- const int kTabPinnedContentWidth[] = {23, 23};
- const int kTabstripNewTabButtonOverlap[] = {5, 6};
- const int kTabstripTabOverlap[] = {16, 16};
- const int kToolbarStandardSpacing[] = {4, 8};
- const int kToolbarElementPadding[] = {0, 8};
- const int kToolbarLocationBarRightPadding[] = {4, 8};
+ const int kFindBarVerticalOffset[] = {1, 6, 6};
+ const int kLocationBarBorderThickness[] = {2, 1, 1};
+ const int kLocationBarBubbleFontVerticalPadding[] = {1, 2, 4};
+ const int kLocationBarBubbleHorizontalPadding[] = {1, 0, 0};
+ const int kLocationBarBubbleVerticalPadding[] = {1, 3, 3};
+ const int kLocationBarBubbleAnchorVerticalInset[] = {5, 6, 8};
+ const int kLocationBarHeight[] = {27, 28, 32};
+ const int kLocationBarHorizontalPadding[] = {3, 6, 6};
+ const int kLocationBarVerticalPadding[] = {0, 1, 1};
+ const int kOmniboxFontPixelSize[] = {16, 14, 14};
+ const int kTabFaviconTitleSpacing[] = {4, 6, 6};
+ const int kTabHeight[] = {29, 29, 33};
+ const int kTabPinnedContentWidth[] = {25, 23, 23};
+#if defined(OS_MACOSX)
+ const int kTabstripNewTabButtonOverlap[] = {8, 5, 6};
+ const int kTabstripTabOverlap[] = {19, 16, 16};
+#else
+ const int kTabstripNewTabButtonOverlap[] = {11, 5, 6};
+ const int kTabstripTabOverlap[] = {26, 16, 16};
+#endif
+ const int kToolbarStandardSpacing[] = {3, 4, 8};
+ const int kToolbarElementPadding[] = {0, 0, 8};
+ const int kToolbarLocationBarRightPadding[] = {0, 4, 8};
const int mode = ui::MaterialDesignController::GetMode();
switch (constant) {
@@ -35,6 +41,8 @@
return kLocationBarBorderThickness[mode];
case LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING:
return kLocationBarBubbleFontVerticalPadding[mode];
+ case LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING:
+ return kLocationBarBubbleHorizontalPadding[mode];
case LOCATION_BAR_BUBBLE_VERTICAL_PADDING:
return kLocationBarBubbleVerticalPadding[mode];
case LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET:
@@ -71,20 +79,20 @@
}
gfx::Insets GetLayoutInsets(LayoutInset inset) {
- const int kAvatarLeftPadding[] = {4, 4};
- const int kAvatarRightPadding[] = {4, 4};
- const int kAvatarBottomPadding[] = {4, 4};
- const int kOmniboxDropdownIconPadding[] = {4, 8};
- const int kOmniboxDropdownPadding[] = {4, 4};
- const int kOmniboxDropdownTextPadding[] = {3, 3};
- const int kTabBottomPadding[] = {1, 1};
- const int kTabHorizontalPadding[] = {16, 18};
- const int kTabTopPadding[] = {1, 1};
- const int kToolbarBottomPadding[] = {5, 5};
- const int kToolbarButtonPadding[] = {6, 6};
- const int kToolbarLeftPadding[] = {4, 8};
- const int kToolbarRightPadding[] = {4, 8};
- const int kToolbarTopPadding[] = {4, 4};
+ const int kAvatarLeftPadding[] = {2, 4, 4};
+ const int kAvatarRightPadding[] = {-6, 4, 4};
+ const int kAvatarBottomPadding[] = {2, 4, 4};
+ const int kOmniboxDropdownIconPadding[] = {2, 4, 8};
+ const int kOmniboxDropdownPadding[] = {3, 4, 4};
+ const int kOmniboxDropdownTextPadding[] = {3, 3, 3};
+ const int kTabBottomPadding[] = {2, 1, 1};
+ const int kTabHorizontalPadding[] = {20, 16, 18};
+ const int kTabTopPadding[] = {4, 1, 1};
+ const int kToolbarBottomPadding[] = {5, 5, 5};
+ const int kToolbarButtonPadding[] = {2, 6, 6};
+ const int kToolbarLeftPadding[] = {3, 4, 8};
+ const int kToolbarRightPadding[] = {2, 4, 8};
+ const int kToolbarTopPadding[] = {5, 4, 4};
const int mode = ui::MaterialDesignController::GetMode();
switch (inset) {
@@ -112,8 +120,8 @@
}
gfx::Size GetLayoutSize(LayoutSize size) {
- const int kNewTabButtonWidth[] = {36, 39};
- const int kNewTabButtonHeight[] = {18, 21};
+ const int kNewTabButtonWidth[] = {34, 36, 39};
+ const int kNewTabButtonHeight[] = {18, 18, 21};
const int mode = ui::MaterialDesignController::GetMode();
switch (size) {
« no previous file with comments | « chrome/browser/ui/layout_constants.h ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698