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

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

Issue 338263002: Change how the insertion point for tab drags is calculated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/tabs/tab_drag_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.h
diff --git a/chrome/browser/ui/views/tabs/tab.h b/chrome/browser/ui/views/tabs/tab.h
index ab362b4f2e456d79c457906c341f4b7de1982c61..9fb036d302c27eeb38b50f98b1f3b8ed9e2f41d9 100644
--- a/chrome/browser/ui/views/tabs/tab.h
+++ b/chrome/browser/ui/views/tabs/tab.h
@@ -99,6 +99,17 @@ class Tab : public gfx::AnimationDelegate,
return &hover_controller_;
}
+ // Returns the inset within the first dragged tab to use when calculating the
+ // "drag insertion point". If we simply used the x-coordinate of the tab,
+ // we'd be calculating based on a point well before where the user considers
+ // the tab to "be". The value here is chosen to "feel good" based on the
+ // widths of the tab images and the tab overlap.
+ //
+ // Note that this must return a value smaller than the midpoint of any tab's
+ // width, or else the user won't be able to drag a tab to the left of the
+ // first tab in the strip.
+ static int leading_width_for_drag() { return 16; }
+
// Returns the minimum possible size of a single unselected Tab.
static gfx::Size GetMinimumUnselectedSize();
// Returns the minimum possible size of a selected Tab. Selected tabs must
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698