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

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 2555623002: Last round of cleaning up MD layout constants. (Closed)
Patch Set: rebase Created 4 years 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/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 1f39de89500c538ee4e219fae2506abe1441cf61..fd255af52b922cf074741f43c5d9a7dae358b469 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -728,8 +728,7 @@ gfx::Size Tab::GetMinimumActiveSize() {
// static
gfx::Size Tab::GetStandardSize() {
const int kNetTabWidth = 193;
- return gfx::Size(kNetTabWidth + GetLayoutConstant(TABSTRIP_TAB_OVERLAP),
- GetMinimumInactiveSize().height());
+ return gfx::Size(kNetTabWidth + kOverlap, GetMinimumInactiveSize().height());
}
// static
@@ -739,8 +738,8 @@ int Tab::GetTouchWidth() {
// static
int Tab::GetPinnedWidth() {
- return GetMinimumInactiveSize().width() +
- GetLayoutConstant(TAB_PINNED_CONTENT_WIDTH);
+ const int kTabPinnedContentWidth = 23;
Peter Kasting 2016/12/08 20:57:50 Nit: Make constexpr
Evan Stade 2016/12/13 01:31:18 Done.
+ return GetMinimumInactiveSize().width() + kTabPinnedContentWidth;
}
// static
@@ -919,9 +918,9 @@ void Tab::Layout() {
// Size the title to fill the remaining width and use all available height.
const bool show_title = ShouldRenderAsNormalTab();
if (show_title) {
- const int title_spacing = GetLayoutConstant(TAB_FAVICON_TITLE_SPACING);
- int title_left = showing_icon_ ?
- (favicon_bounds_.right() + title_spacing) : start;
+ const int kTitleSpacing = 6;
Peter Kasting 2016/12/08 20:57:50 Nit: Make constexpr
Evan Stade 2016/12/13 01:31:18 Done.
+ int title_left =
+ showing_icon_ ? (favicon_bounds_.right() + kTitleSpacing) : start;
int title_width = lb.right() - title_left;
if (showing_alert_indicator_) {
title_width =

Powered by Google App Engine
This is Rietveld 408576698