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

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

Issue 2444923003: Some more pre-material cleanups (Closed)
Patch Set: also remove some layout constants Created 4 years, 2 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: chrome/browser/ui/layout_constants.cc
diff --git a/chrome/browser/ui/layout_constants.cc b/chrome/browser/ui/layout_constants.cc
index 20ad07c4b2cc5e8371d2896487bb01d2c5e5a985..401d9853d737b2c7cf1fb27a9793f15cac54d4b1 100644
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -9,29 +9,29 @@
#include "ui/base/material_design/material_design_controller.h"
int GetLayoutConstant(LayoutConstant constant) {
- 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};
+ const int kFindBarVerticalOffset[] = {6, 6};
+ const int kLocationBarBorderThickness[] = {1, 1};
+ const int kLocationBarBubbleFontVerticalPadding[] = {2, 4};
Evan Stade 2016/10/24 19:09:40 what do we think should happen to the layout const
Peter Kasting 2016/10/24 23:49:56 Things that are only used in one place, whether th
Evan Stade 2016/10/25 16:22:57 this plan soudns fine, but for now (for the purpos
Peter Kasting 2016/10/27 22:16:37 I'm cool with that. You've been cleaning all the
+ const int kLocationBarBubbleHorizontalPadding[] = {0, 0};
Evan Stade 2016/10/24 19:09:41 this one definitely seems like it should just die
Peter Kasting 2016/10/24 23:49:56 Yep.
Evan Stade 2016/10/25 16:22:56 Done.
+ 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};
#if defined(OS_MACOSX)
Evan Stade 2016/10/24 19:09:40 the mac/non mac distinction is no longer important
Peter Kasting 2016/10/24 23:49:56 Yup, rip out
Evan Stade 2016/10/25 16:22:57 Done.
- const int kTabstripNewTabButtonOverlap[] = {8, 5, 6};
- const int kTabstripTabOverlap[] = {19, 16, 16};
+ const int kTabstripNewTabButtonOverlap[] = {5, 6};
+ const int kTabstripTabOverlap[] = {16, 16};
#else
- const int kTabstripNewTabButtonOverlap[] = {11, 5, 6};
- const int kTabstripTabOverlap[] = {26, 16, 16};
+ const int kTabstripNewTabButtonOverlap[] = {5, 6};
+ const int kTabstripTabOverlap[] = {16, 16};
#endif
- const int kToolbarStandardSpacing[] = {3, 4, 8};
- const int kToolbarElementPadding[] = {0, 0, 8};
- const int kToolbarLocationBarRightPadding[] = {0, 4, 8};
+ const int kToolbarStandardSpacing[] = {4, 8};
+ const int kToolbarElementPadding[] = {0, 8};
+ const int kToolbarLocationBarRightPadding[] = {4, 8};
Evan Stade 2016/10/24 19:09:40 perhaps this can/should be combined with ToolbarSt
Peter Kasting 2016/10/24 23:49:56 Probably. In general I'd try to combine constants
Peter Kasting 2016/10/27 22:16:37 Do later?
const int mode = ui::MaterialDesignController::GetMode();
switch (constant) {
@@ -79,20 +79,20 @@ int GetLayoutConstant(LayoutConstant constant) {
}
gfx::Insets GetLayoutInsets(LayoutInset inset) {
- 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 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 mode = ui::MaterialDesignController::GetMode();
switch (inset) {
@@ -120,8 +120,8 @@ gfx::Insets GetLayoutInsets(LayoutInset inset) {
}
gfx::Size GetLayoutSize(LayoutSize size) {
- const int kNewTabButtonWidth[] = {34, 36, 39};
- const int kNewTabButtonHeight[] = {18, 18, 21};
+ const int kNewTabButtonWidth[] = {36, 39};
+ const int kNewTabButtonHeight[] = {18, 21};
const int mode = ui::MaterialDesignController::GetMode();
switch (size) {

Powered by Google App Engine
This is Rietveld 408576698