Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Layout - main window top with all sub windows opening underneath horizontalls #82

Open
Naatan opened this issue May 5, 2017 · 1 comment

Comments

@Naatan
Copy link

Naatan commented May 5, 2017

I would like to have a layout that facilitates a single main window at the top and then basically a row of windows below that.

I've looked at some of the layout files and it's not immediately evident to me how to implement this. Can you give some guidance or general tips?

Thanks

@faho
Copy link
Collaborator

faho commented May 6, 2017

So, this is possibly more complicated than it needs to be, and attempts to simplify it are very much welcome.

What you currently need to do:

  • Make your own layout file (by copying one of the old ones and renaming the class - if I understand your layout correctly I'd pick "HalfLayout")

  • Add the layout to TilingManager.availableLayouts (in the constructor)

  • Modify the class to actually do what you want.

The two methods you are interested in are "addTile" and "removeTile". They both operate on the "this.tiles" array, that contains the tiles. Tiles can be created with Layout._createTile().

So the idea is that the script calls your HorizontalLayout.addTile(), and it will add one additional tile and set the geometry for all tiles correctly. There's a bit of complexity here in that it should try to keep resized tiles intact.

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

No branches or pull requests

2 participants