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

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

Issue 9814013: Ash: Update tab strip for new image assets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/toolbar_view.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_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 8d12889ad5ba0cd247c7fcdcd8b1b7c146c151e4..9f312cf1be974e5077b7b14905becaebc71f7628 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -51,10 +51,21 @@
using views::DropTargetEvent;
+// Offset for the new tab button to bring it closer to the rightmost tab.
+#if defined(USE_ASH)
+static const int kNewTabButtonHOffset = -11;
+static const int kNewTabButtonVOffset = 7;
+#else
static const int kNewTabButtonHOffset = -5;
static const int kNewTabButtonVOffset = 5;
-static const int kSuspendAnimationsTimeMs = 200;
+#endif
+// Amount the left edge of a tab is offset from the rectangle of the tab's
+// favicon/title/close box. Related to the width of IDR_TAB_ACTIVE_LEFT.
+#if defined(USE_ASH)
+static const int kTabHOffset = -28;
+#else
static const int kTabHOffset = -16;
+#endif
static const int kTabStripAnimationVSlop = 40;
// Inactive tabs in a native frame are slightly transparent.
static const int kNativeFrameInactiveTabAlpha = 200;
@@ -169,6 +180,7 @@ void NewTabButton::GetHitTestMask(gfx::Path* path) const {
// These values are defined by the shape of the new tab bitmap. Should that
// bitmap ever change, these values will need to be updated. They're so
// custom it's not really worth defining constants for.
+ // These values are correct for regular and USE_ASH versions of the bitmap.
path->moveTo(0, 1);
path->lineTo(w - 7, 1);
path->lineTo(w - 4, 4);
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698