keep popup elements on screen
What does this PR do? This PR introduces changes which make sure MkTooltip and MkUserPopup won't appear too far to the left, but instead stay within the bounds of the screen.
The change is introduced by making sure the x position of the popup or tooltip is never less than 1px from the left side of the screen. The 1 px is to allow for a teeny bit of margin and the reasoning behind the value is that the clamping from the right side was already done by keeping the popup at least 1px from the edge of the screen. But i'm open to other suggestions when it comes to the margin value.
Screenshots:
Before:
Phone:
Desktop:
(The MkUserPopup is just the right size to not float off the screen when in desktop mode so it's hard to demonstrate)
After:
Phone:
Desktop:
(as for the MkUserPopup, again, there were no issues with it sliding off screen on desktop)
Contribution Guidelines By submitting this merge request, you agr!ee to follow our Contribution Guidelines
-
I agree to follow this project's Contribution Guidelines -
I have made sure to test this pull request





