Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tooltip
insideScrollable
is currently broken since theviewport
passed to theTooltip
is modified byScrollable
to be it's visible bounds instead of the application viewport bounds. This causes theTooltip
to position itself within these bounds.I've added a builder to
Tooltip
to disable the positioning adjustment that ensures its always inside theviewport
withsnap_within_viewport(bool)
. I've then also removed the layer clip when drawing the tooltip so it's not clipped by the scrollable bounds (tooltip is effectively an overlay and should never be clipped).Commit b3f5f74 shows the bug and 046e7e0 shows it being fixed. These commits can get dropped.
I realize this is a hacky solution, since
snap_within_viewport
shouldn't be something that's exposed or even considered and isn't really honest about why it's there. However, since we don't get the actual window viewport in the widget, we have no way of know when or when not to adjust to the viewport.Should we do something like the following, so there is a
window
bounds that can be used that we know is unchanged duringdraw
.Tooltip
can then use this for it's positioning adjustment to the window bounds.