feat(layout_config) Adds the option to configure additional lines of padding around the anchor of the layout (#2851) #3035
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new option to layout_config called anchor_padding. When set to a positive integer, it adds
additional lines of padding around the anchor of a layout.
Fixes #2851
Type of change
How Has This Been Tested?
This results in the following layout:
![Test_10_Vertical](https://private-user-images.githubusercontent.com/52529582/320445618-55d9a34d-468f-4306-8506-675def9acdaf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4MTc3NjksIm5iZiI6MTcxODgxNzQ2OSwicGF0aCI6Ii81MjUyOTU4Mi8zMjA0NDU2MTgtNTVkOWEzNGQtNDY4Zi00MzA2LTg1MDYtNjc1ZGVmOWFjZGFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE5VDE3MTc0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiZjZlNDRjYzE1ZTJlNzA1NGFmMGFmMTZlY2ZiZWRmNWRiNDQyN2ZmOTRkYjFlZDhjOGFhYzJmN2ZkYzI0MTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.83gl3xdxKwmUMDDIdkRpEi1PDIEvmqfc18DFSOB4rto)
The result we care about is the ten lines of additional space between the bottom of the screen and the start of the layout.
This results in the following layout:
![Test_10_North](https://private-user-images.githubusercontent.com/52529582/320447435-c0569022-de0d-4657-9933-d69928cca747.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4MTc3NjksIm5iZiI6MTcxODgxNzQ2OSwicGF0aCI6Ii81MjUyOTU4Mi8zMjA0NDc0MzUtYzA1NjkwMjItZGUwZC00NjU3LTk5MzMtZDY5OTI4Y2NhNzQ3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE5VDE3MTc0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI5ZDBmYmUwZGE4ZjdlZDMyNzlmMTM1Njg1NDA1ZDFkNjUzODI1YWRkMmIxMWUzNWRmY2NiNDdjY2ZlYjhkZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Gm4Nx07eOXlY6CM-Mx4SfQnjnHBZyHU0DP7NsKEzy38)
The result we care about is the two lines of additional space between the top of the screen and the start of the layout.
Configuration:
OS: Manjaro Linux x86_64
Host: Laptop (12th Gen Intel Core) A4
Kernel: 6.1.80-1-MANJARO
Checklist:
I am not quite sure what this last point is about, so I left it open.
Open question:
I have not provided additional tests. I have changed the existing tests to mimic the previous behavior by setting anchorpadding to 1 where applicable. Since this is my first contribution, I am unsure about this. Additional feedback is appreciated.