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 ScrollBar grabber mouse input ignores scroll content margins. #98035

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

Conversation

WhalesState
Copy link
Contributor

@WhalesState WhalesState commented Oct 9, 2024

Fixes this, the grab area now will respect the left and top content margins.

image

Also ignoring the focus style content margins and using only the scroll style's one, to prevent the grabber from changing it's position when focused.

Before:

before.mp4

After:

after.mp4

@WhalesState WhalesState requested a review from a team as a code owner October 9, 2024 20:04
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grab area seems to be still a bit off (red area works, the rest is still click-through):

Screenshot 2024-10-10 at 09 18 01

@AThousandShips AThousandShips added this to the 4.4 milestone Oct 10, 2024
@AThousandShips AThousandShips added cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Oct 10, 2024
@WhalesState
Copy link
Contributor Author

WhalesState commented Oct 10, 2024

Grab area seems to be still a bit off (red area works, the rest is still click-through):

The MRP that he has added includes expand margin for both left and right sides in the grabber, if you check it again, you will see that it's actually centered but the first and last 8 pixels can't be clicked. please test with this MRP after removing the expand margins test-scrollbar-grabber-main.zip and try to add some content margins for the scrolls.

The issue was explained in this comment #98004 (comment), The ScrollBar doesn't take the content margins into account for mouse input.

@WhalesState WhalesState marked this pull request as draft October 18, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:gui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScrollBar StyleBoxTexture Grabber only half usable?
3 participants