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

feat(wm): ultrawide layout resizing #545

Merged
merged 5 commits into from
Oct 7, 2023

Conversation

NotLebedev
Copy link
Contributor

Currently only BSP layout and primary container of custom layouts can be resized. BSP layout is not very good for ultrawide screens and resizing only primary container is limiting. This PR adds resizing for ultrawide-vertical-stack layout and refactors some code related to resize calculation.

  1. Workspace::enforce_resize_constraints can now enforce different constraints for different layouts and for those layouts that can not be resized resize_dimensions is explicitly set to 0 (previously everything was constrained as for BSP)
  2. New function for constraining resizing of ultrawide-vertical-stack layout, which can be resized differently then BSP
  3. Layout calculation for ultrawide-vertical-stack now apply resize_dimensions via new function calculate_ultrawide_adjustment. Base layout is kept the same, resizing changes are applied on top

Change Workspace::enforce_resize_constraints to enforce constraints differently for different layouts
Add enforce_no_resize method for all but bsp layout resize_dimensions
Add Workspace::enforce_resize_for_ultrawide method to apply resize
constraints for ultrawide vertical stack layout.
Add function calculate_ultrawide_adjustment to calculate adjustments for
individual containers in ultrawide vertical stack layout
Refactor ultrawide layout generation in separate function and use
calculated adjustments
Add some helper function and descriptive variable names in calculate_ultrawide_adjustment
Apply clippy lints
@LGUG2Z
Copy link
Owner

LGUG2Z commented Sep 25, 2023

I have checked this out and I'll be running it for a few days; so far so amazing! I'll try to start looking at the code itself closer to the end of the week, but I hope that this can be a part of the next release. 🙏

@LGUG2Z LGUG2Z changed the title feat(wm): Ultrawide layout resizing feat(wm): ultrawide layout resizing Oct 7, 2023
@LGUG2Z LGUG2Z merged commit e5a8146 into LGUG2Z:master Oct 7, 2023
2 checks passed
@LGUG2Z
Copy link
Owner

LGUG2Z commented Oct 7, 2023

@NotLebedev Really enjoyed testing this over the last two weeks, from what I can tell this is rock solid! Thank you so much for this very important contribution! 🙏

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.

2 participants