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

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

Issue 2555623002: Last round of cleaning up MD layout constants. (Closed)
Patch Set: pkasting review, remove debug code, 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..10ea017d0ad252091507cb0200e22ce92e464e47 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);
+ constexpr int kTabPinnedContentWidth = 23;
+ 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;
+ constexpr int kTitleSpacing = 6;
+ int title_left =
+ showing_icon_ ? (favicon_bounds_.right() + kTitleSpacing) : start;
int title_width = lb.right() - title_left;
if (showing_alert_indicator_) {
title_width =
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698