DescriptionChange how the insertion point for tab drags is calculated.
Previously, we would use the X-coordinate of the left edge of the dragged tabs,
and check whether it fell within the left or right half of each tab in the
strip.
This had a couple problems. First, because tabs are wider than they appear (due
to a significant portion of the tab being the outside pieces that are flush or
nearly-flush with the top of the toolbar), the true left edge of the dragged
region is "to the left of" where the user thinks the drag point ought to be, and
this discrepancy becomes noticeable as tabs get narrow, with the insertion
sometimes seeming to happen a tab to the left of where it "ought to". Instead,
we now use a (hardcoded) 16-px offset into the drag region, which is much closer
to where the user perceives the "start" of the region to be.
Second, again because tabs are wider than they appear, the right half of one tab
can overlap with the next tab, indeed sometimes even overlapping with the right
half of that next tab, so the insertion point can be calculated in a way that
appears to be off by a tab or so. Instead, we now simply use the regions
between successive tab midpoints to calculate the desired insertion index.
The result of this is that the apparent "slop zone" between tabs gets slightly
larger, and it takes a slightly further drag to drag to the very beginning of
the tabstrip; but most noticeably, when dragging tabs that are very narrow (e.g.
in tabstrip overflow), dragging feels much more predictable and less like the
instant you grab a set of tabs, they get moved to somewhere strange.
BUG=none
TEST=none
R=sky@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277801
Patch Set 1 #
Messages
Total messages: 3 (0 generated)
|