Update some geometry logic in StackLayout to support more than two stacks
I have a series of CLs in progress to allow StackLayout to support more than two tab stacks. This CL contains the necessary updates to the geometry logic. After this CL (and the preceding ones), the only thing keeping StackLayout from displaying more than two tab stacks is that a lot of the logic is hard coded to always show all normal tabs in one stack and all incognito tabs in another. I will split much of StackLayout into a base class in a future CL to allow creating variants with different behavior. When we display two tab stacks, we use asymmetric margins: we put one tab stack up against the edge of the screen (with a small border added by the Stack itself), and show the edge of the other tab stack on the other side. This CL does not change the behavior for this case. For three or more stacks, the behavior I'm going with for now is to make the margins symmetric. So no matter which stack is focused, we show the current tab centered, with the edge of a neighboring tab showing on either side if present, or a blank margin on that side otherwise. Bug: 648314 Change-Id: I383d9601f521a2eec47263f219027bc23818b3e2 Reviewed-on: https://chromium-review.googlesource.com/940613 Commit-Queue: Ryan Landay <rlanday@chromium.org> Reviewed-by:Matthew Jones <mdjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#542201}
Loading
Please register or sign in to comment