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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc

Issue 1398073002: Fix a variety of tabstrip positioning issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@parametrize
Patch Set: Remove erroneous comment Created 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/glass_browser_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 72bfc76671f4a2a5ae39240abf36e2484fc8b4e2..bac6938a5eb13e0480a6114f53f0494ba1bb6592 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
@@ -59,8 +59,6 @@ namespace {
// Space between the new avatar button and the minimize button.
const int kNewAvatarButtonOffset = 5;
#endif
-// Space between left edge of window and tabstrip.
-const int kTabstripLeftSpacing = 0;
// Space between right edge of tabstrip and maximize button.
const int kTabstripRightSpacing = 10;
// Height of the shadow of the content area, at the top of the toolbar.
@@ -499,9 +497,10 @@ bool BrowserNonClientFrameViewAsh::DoesIntersectRect(
}
int BrowserNonClientFrameViewAsh::GetTabStripLeftInset() const {
- const int icon_width = browser_view()->GetOTRAvatarIcon().width();
- const int insets_width = GetLayoutInsets(AVATAR_ICON).width();
- return avatar_button() ? (icon_width + insets_width) : kTabstripLeftSpacing;
+ const gfx::Insets insets(GetLayoutInsets(AVATAR_ICON));
+ const int avatar_right = avatar_button() ?
+ (insets.left() + browser_view()->GetOTRAvatarIcon().width()) : 0;
+ return avatar_right + insets.right();
}
int BrowserNonClientFrameViewAsh::GetTabStripRightInset() const {
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/glass_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698