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

Unified Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.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/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 0ceb12d4e1b25e047ee80d78763a710386f44015..d78a8b72fc22001d22bb1d819c40bd754857676b 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -139,8 +139,7 @@ GlassBrowserFrameView::~GlassBrowserFrameView() {
gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip(
views::View* tabstrip) const {
- const int x =
- incognito_bounds_.right() + GetLayoutConstant(AVATAR_ICON_PADDING);
+ const int x = incognito_bounds_.right() + kAvatarIconPadding;
int end_x = width() - ClientBorderThickness(false);
if (!CaptionButtonsOnLeadingEdge()) {
end_x = std::min(MinimizeButtonX(), end_x) -
@@ -739,7 +738,6 @@ void GlassBrowserFrameView::LayoutProfileSwitcher() {
}
void GlassBrowserFrameView::LayoutIncognitoIcon() {
- const int pad = GetLayoutConstant(AVATAR_ICON_PADDING);
const gfx::Size size(GetIncognitoAvatarIcon().size());
int x = ClientBorderThickness(false);
// In RTL, the icon needs to start after the caption buttons.
@@ -749,11 +747,12 @@ void GlassBrowserFrameView::LayoutIncognitoIcon() {
kProfileSwitcherButtonOffset)
: 0);
}
- const int bottom =
- GetTopInset(false) + browser_view()->GetTabStripHeight() - pad;
+ const int bottom = GetTopInset(false) + browser_view()->GetTabStripHeight() -
+ kAvatarIconPadding;
incognito_bounds_.SetRect(
- x + (profile_indicator_icon() ? pad : 0), bottom - size.height(),
- profile_indicator_icon() ? size.width() : 0, size.height());
+ x + (profile_indicator_icon() ? kAvatarIconPadding : 0),
+ bottom - size.height(), profile_indicator_icon() ? size.width() : 0,
+ size.height());
if (profile_indicator_icon())
profile_indicator_icon()->SetBoundsRect(incognito_bounds_);
}

Powered by Google App Engine
This is Rietveld 408576698