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

Draggable gaps ? #85

Open
tlvenn opened this issue May 16, 2022 · 1 comment
Open

Draggable gaps ? #85

tlvenn opened this issue May 16, 2022 · 1 comment

Comments

@tlvenn
Copy link

tlvenn commented May 16, 2022

Hi,

I am wondering if the layout can / could support draggable gaps where one gap (a separation between 2 content panes) is draggable to adjust the size / ratio of those 2 panes.

Something like this:
CleanShot 2022-05-16 at 18 36 27

At the same time, maybe this whole thing and a state manager to save the updated layout should be build on top of this project rather than integrated with it...

@ricardoboss
Copy link

+1 on the feature request.

I actually got an idea how this could be accomplished:

  1. create a Splitter/DraggableSeparator widget or sth like that
  2. use GestureDetector to catch drag events
  3. bind a callback to a handler that changes the values in columnSizes/rowSizes

This has the drawback of eliminating the need for a rowGap/columnGap, as the splitter replaces the gap. (OTOH you could also use the gap to make only part of the gap draggable using the splitter)

I just discovered this lib and think its awesome. This feature would be a great improvement nonetheless. Maybe I can play around with the idea. Are there better approaches?

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

No branches or pull requests

2 participants