-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Fix ScrollBar
grabber mouse input ignores scroll content margins.
#98035
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I don't see any difference with and without this PR. The original MRP is still broken, the new MRP works properly without the fix. It would be nice to see some project that works incorrectly on master, but is fixed by this PR. |
Here it is, this will show the issue when you try to drag the scroll-bar, the scroll style just have some margins, test with the current godot version and with this PR MRP. scroll-bar-issue.mp4 |
I confirmed that this fixes a bug, but not the linked issues. Though there are some changes that I'm not sure about. Removing |
You can define the margins inside an empty stylebox, just test again in the current godot's dev branch with a focus style that has some content margins and you will see the grabber runs into a new position after you grab it. also we are using the scroll style by default inside input, so if i revert this change i will have to respect the focus style's margin inside the input function. |
This issue was mentioned in the linked issue, also i have helped him to fix the original issue. so we can close the issue after merging this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
e068036
to
8834e9b
Compare
8834e9b
to
2041d8c
Compare
Thanks! |
Fixes this, the grab area now will respect the left and top content margins.
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