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/wm/overview/window_selector_panels.h" | 5 #include "ash/wm/overview/window_selector_panels.h" |
6 | 6 |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/overview/scoped_transform_overview_window.h" | 10 #include "ash/wm/overview/scoped_transform_overview_window.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 gfx::Rect bounds = (*iter)->GetBoundsInScreen(); | 198 gfx::Rect bounds = (*iter)->GetBoundsInScreen(); |
199 transform.Translate(bounding_rect.x() - bounds.x(), | 199 transform.Translate(bounding_rect.x() - bounds.x(), |
200 bounding_rect.y() - bounds.y()); | 200 bounding_rect.y() - bounds.y()); |
201 transform.PreconcatTransform(bounding_transform); | 201 transform.PreconcatTransform(bounding_transform); |
202 transform.Translate(bounds.x() - bounding_rect.x(), | 202 transform.Translate(bounds.x() - bounding_rect.x(), |
203 bounds.y() - bounding_rect.y()); | 203 bounds.y() - bounding_rect.y()); |
204 (*iter)->SetTransform(root_window, transform, animate); | 204 (*iter)->SetTransform(root_window, transform, animate); |
205 } | 205 } |
206 } | 206 } |
207 | 207 |
| 208 void WindowSelectorPanels::SetOpacity(float opacity) { |
| 209 // TODO(flackr): find a way to make panels that are hidden behind other panels |
| 210 // look nice. |
| 211 for (WindowList::iterator iter = transform_windows_.begin(); |
| 212 iter != transform_windows_.end(); iter++) { |
| 213 (*iter)->window()->layer()->SetOpacity(opacity); |
| 214 } |
| 215 WindowSelectorItem::SetOpacity(opacity); |
| 216 } |
| 217 |
208 } // namespace ash | 218 } // namespace ash |
OLD | NEW |