Commit d676435f authored by Melissa Zhang's avatar Melissa Zhang Committed by Chromium LUCI CQ

[Sharesheet] Hide separator before expand.

To more closely align with mocks hide separator before expand.
This prevents the two separators from overlapping when the expand
occurs.

Bug: 1148692
Change-Id: I3b0254b2da65d14907d0260c2e600f1bc8cf39c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2574569Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Melissa Zhang <melzhang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834417}
parent ab3a31dc
...@@ -481,18 +481,20 @@ void SharesheetBubbleView::ExpandButtonPressed() { ...@@ -481,18 +481,20 @@ void SharesheetBubbleView::ExpandButtonPressed() {
show_expanded_view_ = !show_expanded_view_; show_expanded_view_ = !show_expanded_view_;
ResizeBubble(kDefaultBubbleWidth, show_expanded_view_ ? kExpandedBubbleHeight ResizeBubble(kDefaultBubbleWidth, show_expanded_view_ ? kExpandedBubbleHeight
: kDefaultBubbleHeight); : kDefaultBubbleHeight);
if (show_expanded_view_) {
expand_button_->SetToExpandedState();
AnimateToExpandedState();
} else {
expand_button_->SetToDefaultState();
}
// Scrollview has separators that overlaps with |expand_button_separator_| // Scrollview has separators that overlaps with |expand_button_separator_|
// to create a double line when both are visible, so when scrollview is // to create a double line when both are visible, so when scrollview is
// expanded we hide our separator. // expanded we hide our separator.
expand_button_separator_->SetVisible(!show_expanded_view_); expand_button_separator_->SetVisible(!show_expanded_view_);
expanded_view_->SetVisible(show_expanded_view_); expanded_view_->SetVisible(show_expanded_view_);
expanded_view_separator_->SetVisible(show_expanded_view_); expanded_view_separator_->SetVisible(show_expanded_view_);
if (show_expanded_view_) {
expand_button_->SetToExpandedState();
AnimateToExpandedState();
} else {
expand_button_->SetToDefaultState();
}
} }
void SharesheetBubbleView::AnimateToExpandedState() { void SharesheetBubbleView::AnimateToExpandedState() {
......
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