Commit 49ceb040 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Add Negative Padding for active slider to merge slider and thumb

Test: Manually Tested UI

Change-Id: Ia64891de1bceb262e4ad7f9fe5732fb4bcf34109
Bug: 951488
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1561848
Auto-Submit: Ahmed Mehfooz <amehfooz@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649691}
parent 9f0ad50c
......@@ -270,9 +270,10 @@ void Slider::OnPaint(gfx::Canvas* canvas) {
is_active_ ? kEmptySliderColor
: SkColorSetA(kEmptySliderColor, kHighlightColorAlpha);
// Extra space used to hide slider ends behind the thumb when slider is
// disabled.
const int extra_padding = is_active_ ? 0 : kSliderPadding;
// Padding used to adjust space between slider ends and slider thumb.
// Value is negative when slider is active so that there is no separation
// between slider and thumb.
const int extra_padding = is_active_ ? -kSliderPadding : kSliderPadding;
cc::PaintFlags slider_flags;
slider_flags.setAntiAlias(true);
......
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