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

Skip to content
Commit cd2eed4f authored by Mady Mellor's avatar Mady Mellor
Browse files

Ensure the bubble expanded view aligns with the pointer

We currently top-align the expanded view when bubbles are
shown vertically on left / right edges of the screen. If the height
of the bubble is small, the pointer might be disconnected from
it depending on the bubble's position in the list (e.g. small top
aligned view whereas bubble is last in the list so pointer is at
bottom of the screen).

This change fixes the problem by:
- if the view is < max then center it on the pointer
- if it can't be centered on the pointer align with top or bottom
  depending on the bubble position
- does this by moving a bunch of calculations into BubblePositioner
  and making adjustments to them depending on the situation.

Test: manual: Using bubbles test app you can adjust the height, on
              a phone in landscape & also on tablet verify:
              - the expanded view can center on a bubble
              - the view top aligns if bubble is closer to the top
              - the view bottom aligns if bubble closer to the bottom
              - that the pointer always intersects with the expanded
                view & the view doesn't ever overlap with system bars
Bug: 190560927
Change-Id: I599b97d6ccb08fa385655ce532c0f6cdbe1d1175
parent 0efe115c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment