Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d154de1a authored by Garvit Narang's avatar Garvit Narang
Browse files

Modify scrollbar to include gap between thumb and track

This is an isolated change which only modifies the manner in which round
scrollbars are drawn which is determined by screen shape. Only wearable
devices will be affected by this

The scrollbar uses drawArc method to draw track/thumb. The method
accepts a start angle and a sweep angle to draw the arc with a ROUND
stroke style. Based on the stroke width, above the start angle the arc
is rounded so the top most angular point of the arc is actually not the
start angle but formed by a small semi circular shape above it.

Start angle of the top track is start angle of thumb reduced by
1. Stroke width of thumb
2. Gap between top track and thumb
3. Stroke width of top track
4. Sweep angle of top track

Rest of the calculations are based on similar geometric considerations
exploiting the properties of a circle. The implementation also assumed a
circular display

Bug: 343739581
Test: manual flash and check
Flag: android.view.flags.use_refactored_round_scrollbar

Change-Id: I42c73fdc0b94e3735cc257caac3447bedcd27c68
parent b2b845cf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment