Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: ash/common/wm/overview/window_selector_item.cc

Issue 2111643004: [ash-md] Adjusts animation of the selector after closing an overview item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« ash/common/wm/overview/window_grid.cc ('K') | « ash/common/wm/overview/window_selector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698