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

Layouts: find best compromise to try to respect as many windows' min and max sizes as possible #34

Open
Antikyth opened this issue Nov 21, 2023 · 0 comments
Labels
enhancement New feature or request implementations An existing feature or necessary functionality is further implemented layouts Issues and PRs related to Layout Managers in AquariWM.

Comments

@Antikyth
Copy link
Member

Antikyth commented Nov 21, 2023

Vertical group example

For example, if a window in a vertical group has a minimum width larger than another window in that vertical group's maximum width, you'd either just use the minimum width of the larger one, or somewhere in between (might make the larger one unusable though).

For that same vertical group, the minimum and maximum heights of windows would also affect how window proportions are scaled and how the sizes of new windows are chosen.

If the vertical group spans the whole display's height, and it has two windows in it that both have minimum heights larger than half the display height, then both those windows would also have to be forced to be smaller than their minimum heights.

Nodes

The concept of minimum and maximum sizes will have to be supported by nodes too - a window node's minimum and maximum sizes need to be inherited by all the window node's ancestors to some degree.

This isn't going to be easy to do all the calculations around.

Manual resizing implications

This also has implications for how users are allowed to resize their nodes.

In my opinion, the way this should be handled is users simply are not allowed to resize a node more than its maximum size or less than its minimum. If the node is already in one of those situations due to having to make a compromise with other nodes, the user is able to resize the compromising nodes within the range of compromise.

Because that's not the easiest to understand, here's a diagram:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                   ┃
┃         Window A: minimum         ┃
┃                                   ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━┓
┃                   ┃⎧              ⎫
┃ Window B: maximum ┃⎨ Resize range ⎬
┃                   ┃⎩              ⎭
┗━━━━━━━━━━━━━━━━━━━┛
@Antikyth Antikyth added enhancement New feature or request implementations An existing feature or necessary functionality is further implemented layouts Issues and PRs related to Layout Managers in AquariWM. labels Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implementations An existing feature or necessary functionality is further implemented layouts Issues and PRs related to Layout Managers in AquariWM.
Projects
None yet
Development

No branches or pull requests

1 participant