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

ScrollBar StyleBoxTexture Grabber only half usable? #98004

Closed
rakkarage opened this issue Oct 9, 2024 · 2 comments · Fixed by #98035
Closed

ScrollBar StyleBoxTexture Grabber only half usable? #98004

rakkarage opened this issue Oct 9, 2024 · 2 comments · Fixed by #98035
Milestone

Comments

@rakkarage
Copy link
Contributor

rakkarage commented Oct 9, 2024

Tested versions

Reproducible in:

System information

Godot v4.3.stable - Ubuntu 24.04.1 LTS 24.04 - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 6600 (RADV NAVI23) - 12th Gen Intel(R) Core(TM) i5-12400F (12 Threads)

Issue description

When using StyleBoxTexture for scroll bar only half the grabber is usable. The other half just click thru the grabber onto bar.
Screenshot from 2024-10-09 00-21-20

Thanks.

Steps to reproduce

  • make a scroll bar use StyleBoxTexture from theme.
  • grab.

Minimal reproduction project (MRP)

https://github.com/rakkarage/test-scrollbar-grabber

@rakkarage
Copy link
Contributor Author

rakkarage commented Oct 9, 2024

new

The problem becomes a bit clearer when not use 'Expand Margins' to reach edges.
Maybe this is the real problem? That grabber not line up with edges?
Here the grabber can be grabbed in the gap between bar edge and grabber.

I thought this was how it worked, if use StyleBoxTexture need to use margin (top and bottom) to expand to (VScrollBar) edges... and margin (right and left) to expand to (HScrollBar) edges. But maybe not.

@WhalesState
Copy link
Contributor

WhalesState commented Oct 9, 2024

You don't have to use expand margins, you can set the content margins of the HScrollBar scroll StyleBox to zero for left and right, and the VScrollBar scroll StyleBox to zero for top and bottom, this will make it ignore the texture margins.

Additionaly, the content margins are not respected for mouse input, which is what i'm going to fix for this issue.

Here's the project after applying the changes. test-scrollbar-grabber-main.zip

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

Successfully merging a pull request may close this issue.

3 participants