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

Unified Diff: ash/wm/overview/window_overview.cc

Issue 237963019: Remove remaining window states where window is shown with opacity 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_util.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_overview.cc
diff --git a/ash/wm/overview/window_overview.cc b/ash/wm/overview/window_overview.cc
index fd618b37c1c02fc93eb796fc457bbaa11f41ff5e..da615f755825d499a2b8ac56e3706114ea6c98ee 100644
--- a/ash/wm/overview/window_overview.cc
+++ b/ash/wm/overview/window_overview.cc
@@ -160,8 +160,8 @@ WindowOverview::~WindowOverview() {
ScopedTransformOverviewWindow::kTransitionMilliseconds));
settings.SetPreemptionStrategy(
ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- (*iter)->Show();
(*iter)->layer()->SetOpacity(1);
+ (*iter)->Show();
}
if (cursor_client_)
cursor_client_->UnlockCursor();
@@ -217,10 +217,13 @@ void WindowOverview::SetSelection(size_t index) {
old_selection->SetBoundsInScreen(
GetSelectionBounds(selection_index_) + fade_out_direction,
dst_display);
+ old_selection->Hide();
old_selection->layer()->SetOpacity(0);
InitializeSelectionWidget();
selection_widget_->GetNativeWindow()->SetBoundsInScreen(
target_bounds - fade_out_direction, dst_display);
+ // New selection widget starts with 0 opacity and fades in.
+ selection_widget_->GetNativeWindow()->layer()->SetOpacity(0);
}
ui::ScopedLayerAnimationSettings animation_settings(
selection_widget_->GetNativeWindow()->layer()->GetAnimator());
@@ -234,8 +237,6 @@ void WindowOverview::SetSelection(size_t index) {
} else {
InitializeSelectionWidget();
selection_widget_->SetBounds(target_bounds);
- selection_widget_->GetNativeWindow()->layer()->SetOpacity(
- kWindowOverviewSelectionOpacity);
}
selection_index_ = index;
}
@@ -447,7 +448,8 @@ void WindowOverview::InitializeSelectionWidget() {
selection_widget_->Show();
selection_widget_->GetNativeWindow()->parent()->StackChildAtBottom(
selection_widget_->GetNativeWindow());
- selection_widget_->GetNativeWindow()->layer()->SetOpacity(0);
+ selection_widget_->GetNativeWindow()->layer()->SetOpacity(
+ kWindowOverviewSelectionOpacity);
}
gfx::Rect WindowOverview::GetSelectionBounds(size_t index) {
« no previous file with comments | « ash/shelf/shelf_util.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698