-
Notifications
You must be signed in to change notification settings - Fork 70
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
question about proportionalWidth/proportionalHeight sizing difference in horizontal layout #30
Comments
Or perhaps there could/should be an option for a row to be "vertically fitting" all the proportional elements according to their relative height proportions, just it is horizontally-fitting all the proportional elements according to the relative horizontal proportions. Is there such a way to do that? (so in the example 2 above, the orange bar would be 4 times as tall as the blue one). |
Davide, we could modify the behavior to be as you suggest. I even did it to play a bit with it (and haven't included the tweak in the update stream). |
Got it. I don't have a practical case. I'm going through the code and I was wondering if having only one unique way of calculating the proportions could be enough, it would seem simpler as opposed to having two, but maybe a matter of taste. (which brings me to another question - the "adjustHorizontallyByAt" and "adjustVerticallyByAt" seem to be symmetrical methods that could be handled by one same function. Perhaps another case of having "one way of doing both things", perhaps would be simpler? ) |
Well maybe those could be unified. If I remember correctly, when I wrote them I didn't find a trivial way to do it, without a significant performance penalty. |
Please email https://lists.cuis.st/mailman/listinfo/cuis-dev if you think this deserves further discussion. |
(same question applies for symmetric case of vertical layout)
Basically:
it would seem more logical to me that the second case should behave like the first - height of the elements should be calculated in proportion to all the added morphs rather than only to the height of the container
Example:
See how in the first case the orange morph is 4 times as big as the other (since proportionalWidth is 2 vs 0.5 of the other morph), which in the second example the height is just such that the orange one is just two times as tall as the row. This can be seen as well resizing both layoutMorphs...
Am I missing something?
The text was updated successfully, but these errors were encountered: