Commit 0c9e7fa9 authored by Jennifer Apacible's avatar Jennifer Apacible Committed by Commit Bot

[Picture in Picture] Add margin to close button.

Per UX feedback, add some space between the close button and the edge
of the window.

BUG: 836389
Change-Id: Id527c868b6beef25e7278e737faa2e0aff4ea469
Reviewed-on: https://chromium-review.googlesource.com/1071233
Commit-Queue: apacible <apacible@chromium.org>
Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562004}
parent 5083e4c7
...@@ -35,11 +35,11 @@ constexpr gfx::Size kMinWindowSize = gfx::Size(144, 100); ...@@ -35,11 +35,11 @@ constexpr gfx::Size kMinWindowSize = gfx::Size(144, 100);
const int kBorderThickness = 5; const int kBorderThickness = 5;
const int kResizeAreaCornerSize = 16; const int kResizeAreaCornerSize = 16;
// TODO(apacible): Update sizes per UX feedback and when scaling is determined.
// http://crbug.com/836389
constexpr gfx::Size kCloseButtonSize = gfx::Size(42, 42); constexpr gfx::Size kCloseButtonSize = gfx::Size(42, 42);
constexpr gfx::Size kPlayPauseButtonSize = gfx::Size(90, 90); constexpr gfx::Size kPlayPauseButtonSize = gfx::Size(90, 90);
const int kCloseButtonMargin = 8;
// Colors for the control buttons. // Colors for the control buttons.
SkColor kBgColor = SK_ColorWHITE; SkColor kBgColor = SK_ColorWHITE;
SkColor kControlIconColor = gfx::kChromeIconGrey; SkColor kControlIconColor = gfx::kChromeIconGrey;
...@@ -364,9 +364,10 @@ ui::Layer* OverlayWindowViews::GetPlayPauseControlsLayer() { ...@@ -364,9 +364,10 @@ ui::Layer* OverlayWindowViews::GetPlayPauseControlsLayer() {
} }
gfx::Rect OverlayWindowViews::GetCloseControlsBounds() { gfx::Rect OverlayWindowViews::GetCloseControlsBounds() {
return gfx::Rect( return gfx::Rect(gfx::Point(GetBounds().size().width() -
gfx::Point(GetBounds().size().width() - kCloseButtonSize.width(), 0), kCloseButtonSize.width() - kCloseButtonMargin,
kCloseButtonSize); kCloseButtonMargin),
kCloseButtonSize);
} }
gfx::Rect OverlayWindowViews::GetPlayPauseControlsBounds() { gfx::Rect OverlayWindowViews::GetPlayPauseControlsBounds() {
......
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