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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.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
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index b1377760f0f88e387abacc7a9cf2dc4898d5a165..6fb936b2f9b9405dbe8e181dc741d4748c1b4fa8 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -408,10 +408,11 @@ void BrowserNonClientFrameViewAsh::UpdateProfileIcons() {
// BrowserNonClientFrameViewAsh, private:
int BrowserNonClientFrameViewAsh::GetTabStripLeftInset() const {
- const int pad = GetLayoutConstant(AVATAR_ICON_PADDING);
const int avatar_right =
- profile_indicator_icon() ? (pad + GetIncognitoAvatarIcon().width()) : 0;
- return avatar_right + pad;
+ profile_indicator_icon()
+ ? (kAvatarIconPadding + GetIncognitoAvatarIcon().width())
+ : 0;
+ return avatar_right + kAvatarIconPadding;
}
int BrowserNonClientFrameViewAsh::GetTabStripRightInset() const {
@@ -448,9 +449,9 @@ void BrowserNonClientFrameViewAsh::LayoutProfileIndicatorIcon() {
#endif
const gfx::ImageSkia incognito_icon = GetIncognitoAvatarIcon();
- const int pad = GetLayoutConstant(AVATAR_ICON_PADDING);
- const int avatar_bottom =
- GetTopInset(false) + browser_view()->GetTabStripHeight() - pad;
+ const int avatar_bottom = GetTopInset(false) +
+ browser_view()->GetTabStripHeight() -
+ kAvatarIconPadding;
int avatar_y = avatar_bottom - incognito_icon.height();
// Hide the incognito icon in immersive fullscreen when the tab light bar is
@@ -458,8 +459,8 @@ void BrowserNonClientFrameViewAsh::LayoutProfileIndicatorIcon() {
// recognizable.
const bool avatar_visible = !UseImmersiveLightbarHeaderStyle();
const int avatar_height = avatar_visible ? (avatar_bottom - avatar_y) : 0;
- profile_indicator_icon()->SetBounds(pad, avatar_y, incognito_icon.width(),
- avatar_height);
+ profile_indicator_icon()->SetBounds(kAvatarIconPadding, avatar_y,
+ incognito_icon.width(), avatar_height);
profile_indicator_icon()->SetVisible(avatar_visible);
}

Powered by Google App Engine
This is Rietveld 408576698