Commit 4cfdacae authored by Avery Musbach's avatar Avery Musbach Committed by Commit Bot

splitview: Correct the opacity of the split view highlight in overview.

In overview, the split view drag indicator always has an opacity of 18%,
whereas the specification calls for 30% when indicating where to drag a
window, and 18% when serving as a preview of snapped window bounds:
https://mccanny.users.x20web.corp.google.com/www/splitscreen-motion/index.html#indicator-expand

Test: manual
Bug: 808283
Change-Id: I4cbf1230f34d3b90389c60d8fc909298b8b9d386
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1500912
Commit-Queue: Avery Musbach <amusbach@chromium.org>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637549}
parent 23fbb3be
......@@ -58,7 +58,6 @@ void GetAnimationValuesForType(
case SPLITVIEW_ANIMATION_HIGHLIGHT_FADE_IN:
case SPLITVIEW_ANIMATION_HIGHLIGHT_FADE_OUT:
case SPLITVIEW_ANIMATION_PREVIEW_AREA_FADE_IN:
case SPLITVIEW_ANIMATION_PREVIEW_AREA_FADE_OUT:
case SPLITVIEW_ANIMATION_OVERVIEW_ITEM_FADE_IN:
case SPLITVIEW_ANIMATION_OVERVIEW_ITEM_FADE_OUT:
case SPLITVIEW_ANIMATION_TEXT_FADE_IN_WITH_HIGHLIGHT:
......@@ -67,7 +66,6 @@ void GetAnimationValuesForType(
*out_duration = kHighlightsFadeInOutMs;
*out_tween_type = gfx::Tween::FAST_OUT_SLOW_IN;
return;
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_FADE_IN:
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_SLIDE_IN:
*out_duration = kOtherFadeInOutMs;
*out_tween_type = gfx::Tween::LINEAR_OUT_SLOW_IN;
......@@ -132,12 +130,10 @@ void DoSplitviewOpacityAnimation(ui::Layer* layer,
case SPLITVIEW_ANIMATION_TEXT_FADE_OUT_WITH_HIGHLIGHT:
target_opacity = 0.f;
break;
case SPLITVIEW_ANIMATION_HIGHLIGHT_FADE_IN:
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_FADE_IN:
case SPLITVIEW_ANIMATION_PREVIEW_AREA_FADE_IN:
target_opacity = kPreviewAreaHighlightOpacity;
break;
case SPLITVIEW_ANIMATION_PREVIEW_AREA_FADE_OUT:
case SPLITVIEW_ANIMATION_HIGHLIGHT_FADE_IN:
target_opacity = kHighlightOpacity;
break;
case SPLITVIEW_ANIMATION_OVERVIEW_ITEM_FADE_IN:
......
......@@ -27,16 +27,14 @@ enum SplitviewAnimationType {
// to drag a selector item.
SPLITVIEW_ANIMATION_HIGHLIGHT_FADE_IN,
SPLITVIEW_ANIMATION_HIGHLIGHT_FADE_OUT,
// Used to fade in and out the other highlight. There are normally two
// highlights, one on each side. When entering a state with a preview
// highlight, one highlight is the preview highlight, and the other highlight
// is the other highlight.
SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_FADE_IN,
// Used to fade out the other highlight. There are normally two highlights,
// one on each side. When entering a state with a preview highlight, one
// highlight is the preview highlight, and the other highlight is the other
// highlight.
SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_FADE_OUT,
// Used to fade in and out the preview area highlight which indicate the
// bounds of the window that is about to get snapped.
// Used to fade in the preview area highlight which indicates the bounds of
// the window that is about to get snapped.
SPLITVIEW_ANIMATION_PREVIEW_AREA_FADE_IN,
SPLITVIEW_ANIMATION_PREVIEW_AREA_FADE_OUT,
// Used to fade in and out the label on the overview item which warns users
// the item cannot be snapped. The label appears on the overview item after
// another window has been snapped.
......
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