| Index: ash/launcher/launcher_view.cc
|
| diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
|
| index bf7b96ba250405f228e486d5661ddf9382fa3d23..f79a432ec118612a9f253ba79dd4a3afe75c5fb2 100644
|
| --- a/ash/launcher/launcher_view.cc
|
| +++ b/ash/launcher/launcher_view.cc
|
| @@ -439,8 +439,9 @@ gfx::Rect LauncherView::GetIdealBoundsOfItemIcon(LauncherID id) {
|
| LauncherButton* button =
|
| static_cast<LauncherButton*>(view_model_->view_at(index));
|
| gfx::Rect icon_bounds = button->GetIconBounds();
|
| - return gfx::Rect(ideal_bounds.x() + icon_bounds.x(),
|
| - ideal_bounds.y() + icon_bounds.y(),
|
| + return gfx::Rect(GetMirroredXWithWidthInView(ideal_bounds.x(),
|
| + icon_bounds.width()),
|
| + ideal_bounds.y(),
|
| icon_bounds.width(),
|
| icon_bounds.height());
|
| }
|
| @@ -452,19 +453,21 @@ void LauncherView::UpdatePanelIconPosition(LauncherID id,
|
| if (current_index < first_panel_index)
|
| return;
|
|
|
| + gfx::Point midpoint_in_view(GetMirroredXInView(midpoint.x()),
|
| + midpoint.y());
|
| ShelfLayoutManager* shelf = tooltip_->shelf_layout_manager();
|
| int target_index = current_index;
|
| while (target_index > first_panel_index &&
|
| shelf->PrimaryAxisValue(view_model_->ideal_bounds(target_index).x(),
|
| view_model_->ideal_bounds(target_index).y()) >
|
| - shelf->PrimaryAxisValue(midpoint.x(), midpoint.y())) {
|
| + shelf->PrimaryAxisValue(midpoint_in_view.x(), midpoint_in_view.y())) {
|
| --target_index;
|
| }
|
| while (target_index < view_model_->view_size() - 1 &&
|
| shelf->PrimaryAxisValue(
|
| view_model_->ideal_bounds(target_index).right(),
|
| view_model_->ideal_bounds(target_index).bottom()) <
|
| - shelf->PrimaryAxisValue(midpoint.x(), midpoint.y())) {
|
| + shelf->PrimaryAxisValue(midpoint_in_view.x(), midpoint_in_view.y())) {
|
| ++target_index;
|
| }
|
| if (current_index != target_index)
|
|
|