-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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 issues in ScrollContainer
#92138
Fix scrollbar issues in ScrollContainer
#92138
Conversation
YeldhamDev
commented
May 20, 2024
- Fix scrollbars ignoring panel margins.
- Fix scrollbars and children not updating immediately on theme/RTL changes.
The current state is that the panel margin appears nicely around the contents: godot.windows.editor.dev.x86_64_I68JYK9H5F.mp4idk what happened in your screenshot. |
Have one of the sides just expand instead of giving it a large minimum size and you will see. |
I'm still getting the same results. Can you share the scene? |
Ah, so it's because of the borders. If you remove the borders and instead give it a margin, it looks good. |
It's only weird if both scrolls are active, and besides, using this buggy behavior the create separation between the scrolls and content is hacky, and should be substituted which proper theme constants. Also, fixing this allows to create a separation between the scrolls and the borders, which will be handy for themes that have scrolls with shadows that get clipped by the container. |
By "weird" I mean the space between scrollbar and border. It makes the scroll float above the content.
Not sure what do you mean here. The gap is caused by your changes. I just added a content margin to the StyleBox. I checked how your scene looks with this PR and scrollbars look better with the border, but... eh. I think perfectly the contents should be clipped inside the middle part, so it doesn't go under scrollbars and margins. That's not really possible though. |
That also happens without a border, so I don't know what you're getting at?
Talking about your previous statement: |
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.
Code looks ok.
Thanks! |