Commit d161f9c7 authored by Andrew Xu's avatar Andrew Xu Committed by Commit Bot

[Multipaste] Add image border

This CL adds the border for images shown on the multipaste menu.

Bug: 1131728
Change-Id: I45b25d3b4a790b52c46c035da956e7efc8e78e28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468376Reviewed-by: default avatarDavid Black <dmblack@google.com>
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816685}
parent a3a24c5c
......@@ -8,6 +8,7 @@
#include "ash/clipboard/clipboard_history_resource_manager.h"
#include "ash/clipboard/clipboard_history_util.h"
#include "ash/public/cpp/rounded_image_view.h"
#include "ash/style/ash_color_provider.h"
#include "base/time/time.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/compositor/layer.h"
......@@ -44,6 +45,9 @@ constexpr base::TimeDelta kFadeInDurationMs =
// The radius of the image's rounded corners.
constexpr int kRoundedCornerRadius = 4;
// The thickness of the image border.
constexpr int kBorderThickness = 1;
////////////////////////////////////////////////////////////////////////////////
// FadeImageView
// An ImageView which reacts to updates from ClipboardHistoryResourceManager by
......@@ -236,6 +240,10 @@ ClipboardHistoryBitmapItemView::CreateContentsView() {
auto image_view = BuildImageView();
image_view->SetPreferredSize(gfx::Size(INT_MAX, kBitmapHeight));
image_view_ = contents_view->AddChildView(std::move(image_view));
image_view_->SetBorder(views::CreateRoundedRectBorder(
kBorderThickness, kRoundedCornerRadius,
AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kHairlineBorderColor)));
contents_view->InstallDeleteButton();
return contents_view;
}
......
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