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

SplitContainer dragger does nothing when dragged if the container is too small #55686

Open
rambda opened this issue Dec 7, 2021 · 3 comments

Comments

@rambda
Copy link

rambda commented Dec 7, 2021

Godot version

3.4.stable

System information

Windows 10, GLES3

Issue description

SplitContainer dragger doesn't work in sub-viewport.

Steps to reproduce

  1. set up ViewportContainer - Viewport - HSplitContainer/VSplitContainer (or Use ViewportTexture on TexutreRect/Meshes and viewport.input(event) to forward inputs).
  2. drag SplitContainer's dragger.
  3. will not change size of SplitContainer's children.

Minimal reproduction project

SplitContainerBug.zip

@kleonc
Copy link
Member

kleonc commented Dec 9, 2021

SplitContainers in your example can't resize their children just because of the minimum sizes they need to respect. If you'd make these containers bigger you'd be able to drag the children.

Showing the minimum possible size:
jz3IJHyEYK

For minimum size you can't drag:
13VrzItBHy

For bigger size it works just fine:
L2FtGCUQTm

The same holds for subviewports:
UFlMORrAfA

@Calinou Calinou added documentation and removed bug labels Dec 9, 2021
@Calinou Calinou changed the title SplitContainer dragger doesn't work in sub-viewport. SplitContainer dragger does nothing when dragged if the container is too small Dec 9, 2021
@graydwarf
Copy link

The expected behavior of a splitter is for children to shrink as much as possible and then wrap or get clipped when they won't shrink any more. The children of a splitters containers should have no say in what the splitter can or can't do. The ability to reduce the width should not be blocked outside of the splitters own min_size.x restrictions. Like many others, I now have to roll my own splitter to do what this one should already do.

@Calinou
Copy link
Member

Calinou commented Dec 9, 2022

Like many others, I now have to roll my own splitter to do what this one should already do.

Please post the code for those splitter implementations (or the one you're writing) 🙂

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

No branches or pull requests

5 participants