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

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

Issue 2129213003: [ash-md] Hides frame headers in overview mode not using a mask (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Hides frame headers in overview mode not using a mask (comments) 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
« no previous file with comments | « ash/common/wm/overview/window_grid.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 screen_rect, target_bounds, top_view_inset, title_height); 470 screen_rect, target_bounds, top_view_inset, title_height);
471 gfx::Transform transform = ScopedTransformOverviewWindow::GetTransformForRect( 471 gfx::Transform transform = ScopedTransformOverviewWindow::GetTransformForRect(
472 screen_rect, selector_item_bounds); 472 screen_rect, selector_item_bounds);
473 ScopedTransformOverviewWindow::ScopedAnimationSettings animation_settings; 473 ScopedTransformOverviewWindow::ScopedAnimationSettings animation_settings;
474 transform_window_.BeginScopedAnimation(animation_type, &animation_settings); 474 transform_window_.BeginScopedAnimation(animation_type, &animation_settings);
475 // Rounded corners are achieved by using a mask layer on the original window 475 // Rounded corners are achieved by using a mask layer on the original window
476 // before the transform. Dividing by scale factor obtains the corner radius 476 // before the transform. Dividing by scale factor obtains the corner radius
477 // which when scaled will yield |kLabelBackgroundRadius|. 477 // which when scaled will yield |kLabelBackgroundRadius|.
478 transform_window_.SetTransform( 478 transform_window_.SetTransform(
479 root_window_, transform, 479 root_window_, transform,
480 gfx::ToFlooredInt(kLabelBackgroundRadius / 480 (kLabelBackgroundRadius / GetItemScale(target_bounds.size())));
481 GetItemScale(target_bounds.size())));
482 transform_window_.set_overview_transform(transform); 481 transform_window_.set_overview_transform(transform);
483 } 482 }
484 483
485 void WindowSelectorItem::SetOpacity(float opacity) { 484 void WindowSelectorItem::SetOpacity(float opacity) {
486 window_label_->SetOpacity(opacity); 485 window_label_->SetOpacity(opacity);
487 if (!ash::MaterialDesignController::IsOverviewMaterial()) 486 if (!ash::MaterialDesignController::IsOverviewMaterial())
488 close_button_widget_->SetOpacity(opacity); 487 close_button_widget_->SetOpacity(opacity);
489 488
490 transform_window_.SetOpacity(opacity); 489 transform_window_.SetOpacity(opacity);
491 } 490 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 window_label_selector_window->SetOpacity(opacity); 645 window_label_selector_window->SetOpacity(opacity);
647 } 646 }
648 647
649 void WindowSelectorItem::UpdateCloseButtonAccessibilityName() { 648 void WindowSelectorItem::UpdateCloseButtonAccessibilityName() {
650 close_button_->SetAccessibleName(l10n_util::GetStringFUTF16( 649 close_button_->SetAccessibleName(l10n_util::GetStringFUTF16(
651 IDS_ASH_OVERVIEW_CLOSE_ITEM_BUTTON_ACCESSIBLE_NAME, 650 IDS_ASH_OVERVIEW_CLOSE_ITEM_BUTTON_ACCESSIBLE_NAME,
652 GetWindow()->GetTitle())); 651 GetWindow()->GetTitle()));
653 } 652 }
654 653
655 } // namespace ash 654 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_grid.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698