Commit b50b951d authored by Charlene Yan's avatar Charlene Yan Committed by Commit Bot

[Tab Groups] Hide separator for tab next to a named header.

Bug: 1046554
Change-Id: I79f37516e26aeb0fea7261b20082c7f882485918
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036483Reviewed-by: default avatarConnie Wan <connily@chromium.org>
Commit-Queue: Charlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738308}
parent 551d3050
......@@ -607,10 +607,16 @@ float GM2TabStyle::GetSeparatorOpacity(bool for_layout, bool leading) const {
// animation. Only hide the separator if it's in the first slot, or in
// certain cases if the tab has a visible background (see below).
// If the adjacent view is actually a group header, show the separator since
// the group header takes up a slot.
if (adjacent_to_header)
// If the adjacent view is actually a group header, show the separator unless
// it is to the right of a named group header.
if (adjacent_to_header) {
if (leading && !right_tab->controller()
->GetGroupTitle(right_tab->group().value())
.empty()) {
return 0.0f;
}
return GetHoverInterpolatedSeparatorOpacity(for_layout, nullptr);
}
// If the tab has a visible background even when not selected or active, there
// are additional cases where the separators can be hidden.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment