Pass ImageModel to ImageView::SetImage() in ash
The ImageSkia version of ImageView::SetImage() is deprecated. There's no intended behavior changes with this patch. This CL was uploaded by git cl split. R=blundell@chromium.org Bug: 40137576 Change-Id: I8e32966b7a0758ec2cd759d7669b71d276627664 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6171930 Auto-Submit: SangWoo Ko <sangwoo108@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/main@{#1405392}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
abadf0a477
commit
d4afde24e4
ash
@ -263,8 +263,8 @@ void AnnotationTray::SetTrayEnabled(bool enabled) {
|
|||||||
SkColorSetA(AshColorProvider::Get()->GetContentLayerColor(
|
SkColorSetA(AshColorProvider::Get()->GetContentLayerColor(
|
||||||
AshColorProvider::ContentLayerType::kIconColorPrimary),
|
AshColorProvider::ContentLayerType::kIconColorPrimary),
|
||||||
0x4D);
|
0x4D);
|
||||||
image_view_->SetImage(gfx::CreateVectorIcon(kPaletteTrayIconProjectorIcon,
|
image_view_->SetImage(ui::ImageModel::FromVectorIcon(
|
||||||
disabled_icon_color));
|
kPaletteTrayIconProjectorIcon, disabled_icon_color));
|
||||||
image_view_->SetTooltipText(l10n_util::GetStringUTF16(
|
image_view_->SetTooltipText(l10n_util::GetStringUTF16(
|
||||||
IDS_ASH_STATUS_AREA_PROJECTOR_ANNOTATION_TRAY_UNAVAILABLE));
|
IDS_ASH_STATUS_AREA_PROJECTOR_ANNOTATION_TRAY_UNAVAILABLE));
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ void DragDropController::SetDragImage(const gfx::ImageSkia& image,
|
|||||||
|
|
||||||
DragImageView* drag_image =
|
DragImageView* drag_image =
|
||||||
static_cast<DragImageView*>(drag_image_widget_->GetContentsView());
|
static_cast<DragImageView*>(drag_image_widget_->GetContentsView());
|
||||||
drag_image->SetImage(image);
|
drag_image->SetImage(ui::ImageModel::FromImageSkia(image));
|
||||||
drag_image_offset_ = image_offset;
|
drag_image_offset_ = image_offset;
|
||||||
gfx::Rect drag_image_bounds(current_location_,
|
gfx::Rect drag_image_bounds(current_location_,
|
||||||
drag_image->GetPreferredSize());
|
drag_image->GetPreferredSize());
|
||||||
|
Reference in New Issue
Block a user