Chromium Code Reviews| Index: ash/shelf/shelf_layout_manager.cc |
| diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc |
| index 0d6713b15feb21df009f6147a2b125bd33b6e8ab..dbdad122f6d8cb17ca01ebc68985e5dd6fc53a72 100644 |
| --- a/ash/shelf/shelf_layout_manager.cc |
| +++ b/ash/shelf/shelf_layout_manager.cc |
| @@ -686,11 +686,18 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity( |
| target_bounds.status_opacity); |
| // Having a window which is visible but does not have an opacity is an illegal |
| - // state. We therefore show / hide the shelf here if required. |
| - if (!target_bounds.status_opacity) |
| + // state. We therefore hide the shelf here if required. |
| + if (!target_bounds.status_opacity) { |
| shelf_->status_area_widget()->Hide(); |
| - else if (target_bounds.status_opacity) |
| + } else { |
| + // Setting visibility during an animation causes the visibility property to |
| + // animate. Override the animation settings to immediately set the |
|
flackr
2014/09/23 21:18:40
I'd prefer to see the scope of the ScopedLayerAnim
jonross
2014/09/23 21:34:26
Done.
|
| + // visibility property. Opacity will still animate. |
| + ui::ScopedLayerAnimationSettings no_duration_show( |
| + GetLayer(shelf_->status_area_widget())->GetAnimator()); |
| + no_duration_show.SetTransitionDuration(base::TimeDelta()); |
| shelf_->status_area_widget()->Show(); |
| + } |
| // TODO(harrym): Once status area widget is a child view of shelf |
| // this can be simplified. |