Commit 5b61e43a authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

Fix a bug with the shelf separator

It could happen that the separator would appear after all visible
items (after the overflow button when there was one). This prevents
that from happening.

Bug: 805612
Change-Id: I0a3105a94850a7325c3e642c409ef3603124aa39
Reviewed-on: https://chromium-review.googlesource.com/1173756Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583023}
parent 91321dcd
......@@ -945,7 +945,10 @@ void ShelfView::CalculateIdealBounds(gfx::Rect* overflow_bounds) const {
const int available_size = shelf_->PrimaryAxisValue(width(), height());
const int separator_index = GetSeparatorIndex();
separator_->SetVisible(separator_index != -1);
// Don't show the separator if it isn't needed, or would appear after all
// visible items.
separator_->SetVisible(separator_index != -1 &&
separator_index < last_visible_index_);
int app_list_button_position;
int x = 0;
......
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