Make the Tooltip Position Offset Configurable #26484
Merged
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.
The offset for the tooltip position is at present hardcoded in \scene\main\viewport.cpp to be (10, 10), in the Viewport::_gui_show_tooltip() function.
This can be problematic for certain cursor images; if the image fills most of the 32x32 space cursors should have, then tooltips will appear partially below the cursor.
This pull request adds a project setting which allows configuring the tooltip position offset. The default for this setting is the same as the previous hardcoded value (10, 10).