Fix Minimap Margin and Bounds for Increased Scrollbar Touch Area#100225
Fix Minimap Margin and Bounds for Increased Scrollbar Touch Area#100225appersoncory wants to merge 1 commit intogodotengine:masterfrom
Conversation
…rollbar Touch Area
But, that is a draft and does a lot of other things. cc @WhalesState This should use the scrollbar's width instead of a hardcoded value. |
I still have some issues with the mini map in my PR, so it's better to break it down into 2 PRs. |
|
|
||
| // Use the local variable to adjust for increased scrollbar touch area. | ||
| if (increase_scrollbar_touch_area) { | ||
| xmargin_end -= 50; // Hardcoded value matching the increased touch area size. |
There was a problem hiding this comment.
Instead of hardcoding the value, this should use the v scroll bar's width instead.
This pull request resolves Issue #100186, where the script editor minimap overlaps the vertical scrollbar when "Increase scrollbar touch area" is enabled in the editor settings.
The changes ensure that the minimap adjusts its position dynamically to avoid overlapping with the scrollbar, and the hover, click, and drag functionalities respect the minimap's new position.
Changes Made
Updated the rendering logic to shift the minimap left by the increased scrollbar offset (50px), ensuring proper alignment.
Modified hover, click, and drag detection logic to align with the new minimap position.
Added a new method set_scrollbar_touch_area_enabled in TextEdit to handle the dynamic adjustment of the scrollbar touch area.
The hardcoded offset (50px) matches the touch area size defined in editor_theme_manager.cpp.