Commit 88da69d3 authored by yoshiki iguchi's avatar yoshiki iguchi Committed by Commit Bot

Use UserWorkAreaBounds for calculating tray size

This should fix the size of trays when the docked content is above the
desktop (eg. docked magnifier, spoken feedback, etc...)

Bug: 824077
Test: manual
Change-Id: Iecccb721b14a2ffde045a87993d4951cd677efa4
Reviewed-on: https://chromium-review.googlesource.com/981846
Commit-Queue: Yoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546078}
parent 528a17ff
...@@ -354,9 +354,9 @@ bool WebNotificationTray::ShowMessageCenterInternal(bool show_settings, ...@@ -354,9 +354,9 @@ bool WebNotificationTray::ShowMessageCenterInternal(bool show_settings,
// In the horizontal case, message center starts from the top of the shelf. // In the horizontal case, message center starts from the top of the shelf.
// In the vertical case, it starts from the bottom of WebNotificationTray. // In the vertical case, it starts from the bottom of WebNotificationTray.
const int max_height = const int max_height = (shelf()->IsHorizontalAlignment()
(shelf()->IsHorizontalAlignment() ? shelf()->GetIdealBounds().y() ? shelf()->GetUserWorkAreaBounds().height()
: GetBoundsInScreen().bottom()); : GetBoundsInScreen().bottom());
// Sets the maximum height, considering the padding from the top edge of // Sets the maximum height, considering the padding from the top edge of
// screen. This padding should be applied in all types of shelf alignment. // screen. This padding should be applied in all types of shelf alignment.
message_center_bubble->SetMaxHeight(max_height - kPaddingFromScreenTop); message_center_bubble->SetMaxHeight(max_height - kPaddingFromScreenTop);
......
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