Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Minimap Margin and Bounds for Increased Scrollbar Touch Area #100225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

appersoncory
Copy link

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.

Minimap

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.

@appersoncory appersoncory requested review from a team as code owners December 9, 2024 23:50
@KoBeWi KoBeWi added this to the 4.4 milestone Dec 9, 2024
@AThousandShips AThousandShips changed the title Fix Issue #100186 - Minimap Margin and Bounds for Increased Scrollbar Touch Area Fix Minimap Margin and Bounds for Increased Scrollbar Touch Area Dec 10, 2024
@kitbdev
Copy link
Contributor

kitbdev commented Dec 13, 2024

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.
It should also not need to be dependent on the setting.
For instance, if the user changes the VScrollBar's size using a theme, it should work as well.

@WhalesState
Copy link
Contributor

WhalesState commented Dec 14, 2024

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. It should also not need to be dependent on the setting. For instance, if the user changes the VScrollBar's size using a theme, it should work as well.

I still have some issues with the mini map in my PR, so it's better to break it down into 2 PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script editor minimap overlaps vertical scrollbar when "Increase scrollbar touch area" is enabled
4 participants