Allow vertical alignment for multiline text, improve hover card visuals.
Label text was previously middle-aligned even in the multiline case, despite our text renderer being able to render all vertical alignments. This caused hover card titles to animate vertically and be cut off strangely during transitions between tabs with different numbers of title lines. This CL adds the ability to support vertical alignment for multiline labels, and then aligns the title label on the hover card to ALIGN_TOP so that during transitions from a hover card with one line to one with two title lines results in the first line of the title staying in place while the bottom line is revealed during the animation, which is far more visually pleasing. Because RenderText does not yet support vertical alignment for single- line text, DCHECK guards have been added (as they were previously added to prevent incompatibility between multiline and elision mode) and also TODO reminders to extend functionality to single-line in the future. Bug: 984963, 996905 Change-Id: Ibd2ef6a3c8502a272654b673f83893e06ac5fb53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764942 Auto-Submit: Dana Fried <dfried@chromium.org> Reviewed-by:Michael Wasserman <msw@chromium.org> Commit-Queue: Dana Fried <dfried@chromium.org> Cr-Commit-Position: refs/heads/master@{#689968}
Showing
Please register or sign in to comment