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

Split with golden ratio #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jsantiagoh
Copy link
Contributor

This PR defines a new strategy for splitting panes, instead of dividing the available size (width or height) evenly it uses the golden ratio as a proportion for the split, making the active panel larger.

Something like this

+-----+-----------+-----------------------+
|     |           |                       |
|     |           |                       |
|     |           |                       |
|     |           |                       |
|     |           |                       |
|     |           |                       |
+-----+-----------+-----------------------+

I decided to abstract the split function to be able to test and prevent regressions. It could be that having an option for switching between functions is desirable but I think that in most cases, you want to focus the content of the active panel.

Tests can be abstracted and simplified, but as a start, this should do.

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

Successfully merging this pull request may close these issues.

1 participant