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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 // Scale down both the window and label. | 407 // Scale down both the window and label. |
408 SetBounds(inset_bounds, animation_type); | 408 SetBounds(inset_bounds, animation_type); |
409 // First animate opacity to an intermediate value concurrently with the | 409 // First animate opacity to an intermediate value concurrently with the |
410 // scaling animation. | 410 // scaling animation. |
411 AnimateOpacity(kClosingItemOpacity, animation_type); | 411 AnimateOpacity(kClosingItemOpacity, animation_type); |
412 | 412 |
413 // Fade out the window and the label, effectively hiding them. | 413 // Fade out the window and the label, effectively hiding them. |
414 AnimateOpacity( | 414 AnimateOpacity( |
415 0.0, OverviewAnimationType::OVERVIEW_ANIMATION_CLOSE_SELECTOR_ITEM); | 415 0.0, OverviewAnimationType::OVERVIEW_ANIMATION_CLOSE_SELECTOR_ITEM); |
416 } | 416 } |
417 window_selector_->SetSelectorOpacity(0.f); | |
bruthig
2016/07/04 17:06:22
I feel like the actual opacity value of the Window
varkha
2016/07/04 18:01:30
Done.
| |
417 transform_window_.Close(); | 418 transform_window_.Close(); |
418 return; | 419 return; |
419 } | 420 } |
420 CHECK(sender == window_label_button_view_); | 421 CHECK(sender == window_label_button_view_); |
421 window_selector_->SelectWindow(transform_window_.window()); | 422 window_selector_->SelectWindow(transform_window_.window()); |
422 } | 423 } |
423 | 424 |
424 void WindowSelectorItem::OnWindowDestroying(WmWindow* window) { | 425 void WindowSelectorItem::OnWindowDestroying(WmWindow* window) { |
425 window->RemoveObserver(this); | 426 window->RemoveObserver(this); |
426 transform_window_.OnWindowDestroyed(); | 427 transform_window_.OnWindowDestroyed(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
639 window_label_selector_window->SetOpacity(opacity); | 640 window_label_selector_window->SetOpacity(opacity); |
640 } | 641 } |
641 | 642 |
642 void WindowSelectorItem::UpdateCloseButtonAccessibilityName() { | 643 void WindowSelectorItem::UpdateCloseButtonAccessibilityName() { |
643 close_button_->SetAccessibleName(l10n_util::GetStringFUTF16( | 644 close_button_->SetAccessibleName(l10n_util::GetStringFUTF16( |
644 IDS_ASH_OVERVIEW_CLOSE_ITEM_BUTTON_ACCESSIBLE_NAME, | 645 IDS_ASH_OVERVIEW_CLOSE_ITEM_BUTTON_ACCESSIBLE_NAME, |
645 GetWindow()->GetTitle())); | 646 GetWindow()->GetTitle())); |
646 } | 647 } |
647 | 648 |
648 } // namespace ash | 649 } // namespace ash |
OLD | NEW |