Commit db8cb87b authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Show stacked icon when a notification's icon goes out of view

Bug: 1002714
Change-Id: Iad2c658e651d5301353ca0db289570d1ea94530a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865650Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706636}
parent 47bd294d
......@@ -287,7 +287,11 @@ std::vector<Notification*> UnifiedMessageListView::GetNotificationsAboveY(
int y_offset) const {
std::vector<Notification*> notifications;
for (views::View* view : children()) {
if (view->bounds().bottom() <= y_offset) {
int bottom_limit =
features::IsUnifiedMessageCenterRefactorEnabled()
? view->bounds().y() + kNotificationIconStackThreshold
: view->bounds().bottom();
if (bottom_limit <= y_offset) {
Notification* notification =
MessageCenter::Get()->FindVisibleNotificationById(
AsMVC(view)->GetNotificationId());
......
......@@ -101,6 +101,7 @@ constexpr gfx::Insets kUnifiedSliderPadding(0, 16);
constexpr int kMessageCenterCollapseThreshold = 175;
constexpr int kStackedNotificationBarHeight = 32;
constexpr int kStackedNotificationBarCollapsedHeight = 40;
constexpr int kNotificationIconStackThreshold = 28;
constexpr int kUnifiedSliderViewSpacing = 12;
constexpr int kUnifiedMenuPadding = 8;
constexpr int kUnifiedMessageCenterBubbleSpacing = 8;
......
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