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..3c15ea7fddf27187346cff3865e360f8278fcbf0 100644 |
| --- a/ash/shelf/shelf_layout_manager.cc |
| +++ b/ash/shelf/shelf_layout_manager.cc |
| @@ -652,6 +652,11 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity( |
| ui::ImplicitAnimationObserver* observer) { |
| base::AutoReset<bool> auto_reset_updating_bounds(&updating_bounds_, true); |
| + // Setting visibility after enabling animations cause the visibile property to |
| + // animate. Enable visibility here so that opacity can animate. |
| + if (target_bounds.status_opacity) |
| + shelf_->status_area_widget()->Show(); |
|
flackr
2014/09/23 19:14:03
This doesn't cause the invalid window state (Visib
jonross
2014/09/23 20:50:06
This apparently does trigger an invalid state, how
jonross
2014/09/23 21:06:20
Moved it for correctness.
|
| + |
| ui::ScopedLayerAnimationSettings shelf_animation_setter( |
| GetLayer(shelf_)->GetAnimator()); |
| ui::ScopedLayerAnimationSettings status_animation_setter( |
| @@ -686,11 +691,9 @@ 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. |
| + // 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) |
| - shelf_->status_area_widget()->Show(); |
| // TODO(harrym): Once status area widget is a child view of shelf |
| // this can be simplified. |