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

Wrapping/Floating Grids #269

Open
Anteproperispomenon opened this issue May 1, 2023 · 1 comment
Open

Wrapping/Floating Grids #269

Anteproperispomenon opened this issue May 1, 2023 · 1 comment
Labels
new feature New feature

Comments

@Anteproperispomenon
Copy link

As I currently understand it, there's no (easy) way to allow widgets to float from one row of a grid to another. I'm working on a widget that is essentially a large grid of buttons, and I'd like the number of widgets per row to be dependent on the size allotted to the grid.

e.g. if the grid is currently 10x5 buttons, and then is resized to only have half the horizontal space, then it would become a 5x10 grid of buttons.

For an example of the kind of grid I'm looking for, got to jisho.org and click on "Radicals". Then, try resizing the browser window.

@fjvallarino
Copy link
Owner

@Anteproperispomenon there is currently not a layout widget like that, but it's something I have planned for the not-so-distant future. The way I envision it, it should support these behaviors:

  • You should be able to specify a minimum/maximum width per item, have them adjust their size as needed, and flow to the next row when appropriate.
  • Alternatively, it should support specifying a maximum number of items per row.
  • Fixed width items should not be affected by resizing mechanisms.
  • The height of a row is determined by the tallest widget contained in it. Vertical alignment should be handled by the user (with box, for example).
  • These behaviors, which I described flowing horizontally, should also be supported vertically. Not simultaneously; it's one or the other.

There are some extra complications, such as the sizing requests of each widget. Handling the fixed case and proportional ones is not a problem, but it becomes more complex with all the other cases. At the same time, maybe those two cases are enough.

@fjvallarino fjvallarino added enhancement Improvements to an existing feature new feature New feature and removed enhancement Improvements to an existing feature labels May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants