Add a setting to configure centered layout fixed width (#167568)

* Added logic for togglable fixed width centered layout

* Added new config option for fixed width centered layout

* Connected CenteredViewLayout to the 'centeredViewFixedWidth' option

* CodeCleanup

* Fixed bug where proportional margins did not resize in sync, also simplified some code

* Removed Todo

* Moved the call to setFixedWidth as per suggestion

* registered the event listener for OptionsChanged

* small perf tweak

---------

Co-authored-by: Victor Harabari <victor.harabari@flir.net>
Co-authored-by: SteVen Batten <sbatten@microsoft.com>
This commit is contained in:
FancyBanana
2023-01-31 16:45:48 +01:00
committed by GitHub
parent 42f41d4f25
commit f6e10119eb
5 changed files with 76 additions and 20 deletions
@@ -269,6 +269,11 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
'default': true,
'description': localize('centeredLayoutAutoResize', "Controls if the centered layout should automatically resize to maximum width when more than one group is open. Once only one group is open it will resize back to the original centered width.")
},
'workbench.editor.centeredLayoutFixedWidth': {
'type': 'boolean',
'default': false,
'description': localize('centeredLayoutDynamicWidth', "Controls wether the centered layout tries to maintain constant width when the window is resized.")
},
'workbench.editor.limit.enabled': {
'type': 'boolean',
'default': false,