Commit 65a0d4f2 authored by Ionel Popescu's avatar Ionel Popescu Committed by Commit Bot

Address eye dropper UI feedback.

This CL fixes the following eye dropper UI issues:
- center square for the eye dropper border should be black & white
double strokes
- macOS pre-10.15 eye dropper size should be a 9x9 square.

Bug: 1130418, 1130415
Change-Id: I8ae3c22b01aef0ebd4bbf94a9e31d0192d3f58a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424668Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Commit-Queue: Ionel Popescu <iopopesc@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#809657}
parent 7f440265
......@@ -186,10 +186,17 @@ void EyeDropperView::OnPaint(gfx::Canvas* view_canvas) {
flags);
}
// Paint central pixel in red.
// Paint central pixel.
gfx::RectF pixel((size().width() - kPixelSize) / 2,
(size().height() - kPixelSize) / 2, kPixelSize, kPixelSize);
flags.setColor(SK_ColorRED);
flags.setAntiAlias(true);
flags.setColor(SK_ColorWHITE);
flags.setStrokeWidth(2);
pixel.Inset(-0.5f, -0.5f);
view_canvas->DrawRect(pixel, flags);
flags.setColor(SK_ColorBLACK);
flags.setStrokeWidth(1);
pixel.Inset(0.5f, 0.5f);
view_canvas->DrawRect(pixel, flags);
// Paint outline.
......
......@@ -94,11 +94,11 @@ void EyeDropperView::ShowCursor() {
}
gfx::Size EyeDropperView::GetSize() const {
return gfx::Size(70, 70);
return gfx::Size(90, 90);
}
float EyeDropperView::GetDiameter() const {
return 70;
return 90;
}
std::unique_ptr<content::EyeDropper> ShowEyeDropper(
......
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