-
Notifications
You must be signed in to change notification settings - Fork 31.9k
#14464 Preserve editor size when switching layout #17760
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
Conversation
Hi @charlespierce, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
Hi @charlespierce, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charlespierce very nice. only comment I have is to not expose the "keep ratio" thing to the API because it seems noone outside the editor groups control would ever use it.
@@ -760,7 +760,7 @@ export class EditorGroupsControl implements IEditorGroupsControl, IVerticalSashL | |||
this.sashTwo.setOrientation(this.layoutVertically ? Orientation.VERTICAL : Orientation.HORIZONTAL); | |||
|
|||
// Trigger layout | |||
this.arrangeGroups(GroupArrangement.EVEN); | |||
this.arrangeGroups(GroupArrangement.KEEP_RATIO); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to not introduce a GroupArrangement.KEEP_RATIO
but rather allow to call arrangeGroups
without any parameter and then use that as an indication to "keep the ratio". I would not expose this as API but just set the arrangement optional here in this file.
@@ -12,7 +12,8 @@ import Event from 'vs/base/common/event'; | |||
|
|||
export enum GroupArrangement { | |||
MINIMIZE_OTHERS, | |||
EVEN | |||
EVEN, | |||
KEEP_RATIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to not expose.
7790ab5
to
38038ba
Compare
@bpasero Removed |
@charlespierce thanks 👍 |
Implementation of #14464
Currently when switching from horizontal to vertical editor layout (or vice-versa), the layout is reset to all editors being evenly sized. We would like it if the editors maintained their relative size when switching layouts.
Additionally, the minimized state of any editors should be preserved so that editors that were minimized in one layout are still minimized after switching.