Commit 54bd6ba5 authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

cros: Fix context menu positioning for left shelf

Fix a simple error that I made in the context menu positioning logic.

Bug: 838389
Change-Id: I2ee54d111a47bfa101af7db2fa8593ca26275a73
Reviewed-on: https://chromium-review.googlesource.com/1050509
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556910}
parent 3ea60d80
...@@ -2246,7 +2246,7 @@ gfx::Rect MenuController::CalculateBubbleMenuBounds(MenuItemView* item, ...@@ -2246,7 +2246,7 @@ gfx::Rect MenuController::CalculateBubbleMenuBounds(MenuItemView* item,
y = owner_bounds.origin().y() - border_and_shadow_insets.top(); y = owner_bounds.origin().y() - border_and_shadow_insets.top();
// Align the left of the menu with the right of the anchor. // Align the left of the menu with the right of the anchor.
if (x < 0) { if (x < 0) {
x = owner_bounds.right() + border_and_shadow_insets.left() + x = owner_bounds.right() - border_and_shadow_insets.left() +
menu_config.touchable_anchor_offset; menu_config.touchable_anchor_offset;
} }
// Align the bottom of the menu to the bottom of the anchor. // Align the bottom of the menu to the bottom of the anchor.
......
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