Commit e732005b authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS Shelf: Address a couple of TODOs in the status area

Change-Id: I9d496a7a8b4b8cb00c8a38831aa80de17ff901c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879456
Auto-Submit: Manu Cornet <manucornet@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709474}
parent f3bef85c
...@@ -293,10 +293,9 @@ void TrayBackgroundView::ChildPreferredSizeChanged(views::View* child) { ...@@ -293,10 +293,9 @@ void TrayBackgroundView::ChildPreferredSizeChanged(views::View* child) {
std::unique_ptr<views::InkDropRipple> TrayBackgroundView::CreateInkDropRipple() std::unique_ptr<views::InkDropRipple> TrayBackgroundView::CreateInkDropRipple()
const { const {
// TODO(minch): Do not hard code the color, get the background color of shelf
// instead.
const AshColorProvider::RippleAttributes ripple_attributes = const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(SK_ColorBLACK); AshColorProvider::Get()->GetRippleAttributes(
ShelfConfig::Get()->GetDefaultShelfColor());
return std::make_unique<views::FloodFillInkDropRipple>( return std::make_unique<views::FloodFillInkDropRipple>(
size(), GetBackgroundInsets(), GetInkDropCenterBasedOnLastEvent(), size(), GetBackgroundInsets(), GetInkDropCenterBasedOnLastEvent(),
ripple_attributes.base_color, ripple_attributes.inkdrop_opacity); ripple_attributes.base_color, ripple_attributes.inkdrop_opacity);
...@@ -306,7 +305,7 @@ std::unique_ptr<views::InkDropHighlight> ...@@ -306,7 +305,7 @@ std::unique_ptr<views::InkDropHighlight>
TrayBackgroundView::CreateInkDropHighlight() const { TrayBackgroundView::CreateInkDropHighlight() const {
gfx::Rect bounds = GetBackgroundBounds(); gfx::Rect bounds = GetBackgroundBounds();
// Currently, we don't handle view resize. To compensate for that, enlarge the // Currently, we don't handle view resize. To compensate for that, enlarge the
// bounds by two tray icons so that the hightlight looks good even if two more // bounds by two tray icons so that the highlight looks good even if two more
// icons are added when it is visible. Note that ink drop mask handles resize // icons are added when it is visible. Note that ink drop mask handles resize
// correctly, so the extra highlight would be clipped. // correctly, so the extra highlight would be clipped.
// TODO(mohsen): Remove this extra size when resize is handled properly (see // TODO(mohsen): Remove this extra size when resize is handled properly (see
...@@ -314,10 +313,9 @@ TrayBackgroundView::CreateInkDropHighlight() const { ...@@ -314,10 +313,9 @@ TrayBackgroundView::CreateInkDropHighlight() const {
const int icon_size = kTrayIconSize + 2 * kTrayImageItemPadding; const int icon_size = kTrayIconSize + 2 * kTrayImageItemPadding;
bounds.set_width(bounds.width() + 2 * icon_size); bounds.set_width(bounds.width() + 2 * icon_size);
bounds.set_height(bounds.height() + 2 * icon_size); bounds.set_height(bounds.height() + 2 * icon_size);
// TODO(minch): Do not hard code the color, get the background color of shelf
// instead.
const AshColorProvider::RippleAttributes ripple_attributes = const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(SK_ColorBLACK); AshColorProvider::Get()->GetRippleAttributes(
ShelfConfig::Get()->GetDefaultShelfColor());
std::unique_ptr<views::InkDropHighlight> highlight( std::unique_ptr<views::InkDropHighlight> highlight(
new views::InkDropHighlight(bounds.size(), 0, new views::InkDropHighlight(bounds.size(), 0,
gfx::RectF(bounds).CenterPoint(), gfx::RectF(bounds).CenterPoint(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment