Commit d79c9f00 authored by Andrew Xu's avatar Andrew Xu Committed by Commit Bot

Fix the issue that the padding at the right edge is missing

|icons_size| should contain the padding space on both edges. This CL
fixes such an issue.


Bug: 1009483
Change-Id: Ibfd44f5e70bd345fe9b623aa4ff2377ddb4c8250
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832463
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701374}
parent c4948f05
......@@ -765,7 +765,8 @@ gfx::Insets ScrollableShelfView::CalculateEdgePadding() const {
return CalculatePaddingForDisplayCentering();
const int icons_size = shelf_view_->GetSizeOfAppIcons(
shelf_view_->number_of_visible_apps(), false);
shelf_view_->number_of_visible_apps(), false) +
2 * GetAppIconEndPadding();
const int base_padding = ShelfConfig::Get()->app_icon_group_margin();
const int available_size_for_app_icons =
......@@ -795,7 +796,8 @@ gfx::Insets ScrollableShelfView::CalculateEdgePadding() const {
gfx::Insets ScrollableShelfView::CalculatePaddingForDisplayCentering() const {
const int icons_size = shelf_view_->GetSizeOfAppIcons(
shelf_view_->number_of_visible_apps(), false);
shelf_view_->number_of_visible_apps(), false) +
2 * GetAppIconEndPadding();
const gfx::Rect display_bounds =
screen_util::GetDisplayBoundsWithShelf(GetWidget()->GetNativeWindow());
const int display_size_primary = GetShelf()->PrimaryAxisValue(
......
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