| Index: chrome/browser/ui/panels/panel_strip.cc
|
| diff --git a/chrome/browser/ui/panels/panel_strip.cc b/chrome/browser/ui/panels/panel_strip.cc
|
| index e62e34bb5383011e9bebd6f733f7be8853f810f3..4d61150f4c42cb586c2316a8c65b72fc9b8cecea 100644
|
| --- a/chrome/browser/ui/panels/panel_strip.cc
|
| +++ b/chrome/browser/ui/panels/panel_strip.cc
|
| @@ -124,7 +124,8 @@ void PanelStrip::AddExistingPanel(Panel* panel) {
|
| int width = restored_size.width();
|
| int x = GetRightMostAvailablePosition() - width;
|
| int y = strip_bounds_.bottom() - height;
|
| - panel->SetPanelBounds(gfx::Rect(x, y, width, height));
|
| + panel->SetPanelBounds(gfx::Rect(x, y, width, height),
|
| + true); // use animation.
|
| }
|
|
|
| int PanelStrip::GetMaxPanelWidth() const {
|
| @@ -198,7 +199,7 @@ void PanelStrip::Drag(int delta_x) {
|
| Panel* dragging_panel = panels_[dragging_panel_index_];
|
| gfx::Rect new_bounds(dragging_panel->GetBounds());
|
| new_bounds.set_x(new_bounds.x() + delta_x);
|
| - dragging_panel->SetPanelBounds(new_bounds);
|
| + dragging_panel->SetPanelBounds(new_bounds, true); // use animation.
|
|
|
| // Checks and processes other affected panels.
|
| if (delta_x > 0)
|
| @@ -233,7 +234,7 @@ void PanelStrip::DragLeft() {
|
| gfx::Rect bounds(current_panel->GetBounds());
|
| bounds.set_x(current_panel_right_boundary - bounds.width());
|
| current_panel_right_boundary -= bounds.width() + kPanelsHorizontalSpacing;
|
| - current_panel->SetPanelBounds(bounds);
|
| + current_panel->SetPanelBounds(bounds, true); // use animation.
|
|
|
| // Updates the index of current panel since it has been moved to the
|
| // position of previous panel.
|
| @@ -276,7 +277,7 @@ void PanelStrip::DragRight() {
|
| gfx::Rect bounds(current_panel->GetBounds());
|
| bounds.set_x(current_panel_left_boundary);
|
| current_panel_left_boundary += bounds.width() + kPanelsHorizontalSpacing;
|
| - current_panel->SetPanelBounds(bounds);
|
| + current_panel->SetPanelBounds(bounds, true); // use animation.
|
|
|
| // Updates the index of current panel since it has been moved to the
|
| // position of previous panel.
|
| @@ -300,7 +301,7 @@ void PanelStrip::EndDragging(bool cancelled) {
|
| panels_[dragging_panel_index_]->GetBounds().x());
|
| } else {
|
| panels_[dragging_panel_index_]->SetPanelBounds(
|
| - dragging_panel_bounds_);
|
| + dragging_panel_bounds_, true); // use animation.
|
| }
|
|
|
| dragging_panel_index_ = kInvalidPanelIndex;
|
| @@ -369,7 +370,7 @@ void PanelStrip::OnPreferredWindowSizeChanged(
|
| --i) {
|
| gfx::Rect this_bounds = panels_[i]->GetBounds();
|
| this_bounds.set_x(this_bounds.x() + delta);
|
| - panels_[i]->SetPanelBounds(this_bounds);
|
| + panels_[i]->SetPanelBounds(this_bounds, true); // use animation.
|
| }
|
| }
|
|
|
| @@ -393,7 +394,7 @@ void PanelStrip::OnPreferredWindowSizeChanged(
|
| if (new_size != restored_size)
|
| panel->set_restored_size(new_size);
|
|
|
| - panel->SetPanelBounds(bounds);
|
| + panel->SetPanelBounds(bounds, true); // use animation.
|
| }
|
|
|
| bool PanelStrip::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const {
|
| @@ -554,7 +555,7 @@ void PanelStrip::Rearrange(Panels::iterator iter_to_start,
|
| new_bounds.set_y(
|
| GetBottomPositionForExpansionState(panel->expansion_state()) -
|
| new_bounds.height());
|
| - panel->SetPanelBounds(new_bounds);
|
| + panel->SetPanelBounds(new_bounds, true); // use animation.
|
|
|
| rightmost_position = new_bounds.x() - kPanelsHorizontalSpacing;
|
| }
|
|
|