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

Unified Diff: ash/common/system/tray/tray_popup_utils.cc

Issue 2508063004: Take size in ink drop masks instead of bounds (Closed)
Patch Set: Rebased Created 4 years, 1 month 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/common/system/tray/tray_background_view.cc ('k') | ui/views/animation/ink_drop_mask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_popup_utils.cc
diff --git a/ash/common/system/tray/tray_popup_utils.cc b/ash/common/system/tray/tray_popup_utils.cc
index 5d07d9bcf0e467e7a39e0e5cf097d86c7c09a2d4..c79b42a2e7f9716a338e054f23ed50be89579212 100644
--- a/ash/common/system/tray/tray_popup_utils.cc
+++ b/ash/common/system/tray/tray_popup_utils.cc
@@ -343,18 +343,18 @@ std::unique_ptr<views::InkDropMask> TrayPopupUtils::CreateInkDropMask(
if (ink_drop_style == TrayPopupInkDropStyle::FILL_BOUNDS)
return nullptr;
- const gfx::Rect layer_bounds = host->GetLocalBounds();
+ const gfx::Size layer_size = host->size();
const gfx::Rect mask_bounds = GetInkDropBounds(ink_drop_style, host);
switch (ink_drop_style) {
case TrayPopupInkDropStyle::HOST_CENTERED: {
const int radius =
std::min(mask_bounds.width(), mask_bounds.height()) / 2;
return base::MakeUnique<views::CircleInkDropMask>(
- layer_bounds, mask_bounds.CenterPoint(), radius);
+ layer_size, mask_bounds.CenterPoint(), radius);
}
case TrayPopupInkDropStyle::INSET_BOUNDS:
return base::MakeUnique<views::RoundRectInkDropMask>(
- layer_bounds, mask_bounds, kTrayPopupInkDropCornerRadius);
+ layer_size, mask_bounds, kTrayPopupInkDropCornerRadius);
case TrayPopupInkDropStyle::FILL_BOUNDS:
// Handled by quick return above.
break;
« no previous file with comments | « ash/common/system/tray/tray_background_view.cc ('k') | ui/views/animation/ink_drop_mask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698