Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/wm/overview/window_selector_item.h" | 5 #include "ash/common/wm/overview/window_selector_item.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/material_design/material_design_controller.h" | 10 #include "ash/common/material_design/material_design_controller.h" |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 666 this, label_view_, close_button_, background_view_); | 666 this, label_view_, close_button_, background_view_); |
| 667 item_widget_->SetContentsView(caption_container_view_); | 667 item_widget_->SetContentsView(caption_container_view_); |
| 668 label_view_->SetVisible(false); | 668 label_view_->SetVisible(false); |
| 669 item_widget_->SetOpacity(0); | 669 item_widget_->SetOpacity(0); |
| 670 item_widget_->Show(); | 670 item_widget_->Show(); |
| 671 | 671 |
| 672 // TODO(varkha): Restore shadows when programmatic shadows exist. | 672 // TODO(varkha): Restore shadows when programmatic shadows exist. |
| 673 // Note: current shadow implementation does not allow proper animation when | 673 // Note: current shadow implementation does not allow proper animation when |
| 674 // the parent layer bounds change during the animation since | 674 // the parent layer bounds change during the animation since |
| 675 // Shadow::UpdateLayerBounds() only happens before the animation starts. | 675 // Shadow::UpdateLayerBounds() only happens before the animation starts. |
| 676 if (ash::MaterialDesignController::GetMode() == | 676 #if 0 |
|
tdanderson
2017/02/13 17:36:28
Just delete this code instead.
Evan Stade
2017/02/13 17:41:01
there's other related code throughout this file (b
varkha
2017/02/13 17:44:01
Yes, please go ahead. The shadow was barely visibl
Evan Stade
2017/02/13 17:52:24
indeed, it was supposed to be there for Alt+Tab to
Evan Stade
2017/02/13 19:29:42
Done.
| |
| 677 ash::MaterialDesignController::Mode::MATERIAL_EXPERIMENTAL) { | 677 shadow_.reset(new ::wm::Shadow()); |
| 678 shadow_.reset(new ::wm::Shadow()); | 678 shadow_->Init(::wm::ShadowElevation::MEDIUM); |
| 679 shadow_->Init(::wm::ShadowElevation::MEDIUM); | 679 shadow_->layer()->SetVisible(true); |
| 680 shadow_->layer()->SetVisible(true); | 680 item_widget_->GetLayer()->Add(shadow_->layer()); |
| 681 item_widget_->GetLayer()->Add(shadow_->layer()); | 681 #endif |
| 682 } | |
| 683 item_widget_->GetLayer()->SetMasksToBounds(false); | 682 item_widget_->GetLayer()->SetMasksToBounds(false); |
| 684 } | 683 } |
| 685 | 684 |
| 686 void WindowSelectorItem::UpdateHeaderLayout( | 685 void WindowSelectorItem::UpdateHeaderLayout( |
| 687 HeaderFadeInMode mode, | 686 HeaderFadeInMode mode, |
| 688 OverviewAnimationType animation_type) { | 687 OverviewAnimationType animation_type) { |
| 689 gfx::Rect transformed_window_bounds = root_window_->ConvertRectFromScreen( | 688 gfx::Rect transformed_window_bounds = root_window_->ConvertRectFromScreen( |
| 690 transform_window_.GetTransformedBounds()); | 689 transform_window_.GetTransformedBounds()); |
| 691 | 690 |
| 692 gfx::Rect label_rect(close_button_->GetPreferredSize()); | 691 gfx::Rect label_rect(close_button_->GetPreferredSize()); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 792 | 791 |
| 793 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() { | 792 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() { |
| 794 return background_view_ ? background_view_->animation() : nullptr; | 793 return background_view_ ? background_view_->animation() : nullptr; |
| 795 } | 794 } |
| 796 | 795 |
| 797 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() { | 796 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() { |
| 798 return transform_window_.GetOverviewWindowForMinimizedState(); | 797 return transform_window_.GetOverviewWindowForMinimizedState(); |
| 799 } | 798 } |
| 800 | 799 |
| 801 } // namespace ash | 800 } // namespace ash |
| OLD | NEW |