Comments (5)
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).
from cuis-smalltalk-dev.
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).
For minor direction layout (height in your example), the parameter (2.0 and 0.5 in your example) are taken as fractions of the available space. If a fraction greater than 1 is specified, it is considered 1. I think it is simple, and enough.
For major direction, I scaled everything by the sum of all fractions, but only if that sum is greater than one. This makes it easy to keep adding widgets without needing to tweak the fractions of all the previous ones. But it also allows exact control (by giving fractions that sum to less than 1).
Does this makes sense? Do you still see a reason for changing the minor (vertical) layout?
from cuis-smalltalk-dev.
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? )
from cuis-smalltalk-dev.
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.
from cuis-smalltalk-dev.
Please email https://lists.cuis.st/mailman/listinfo/cuis-dev if you think this deserves further discussion.
from cuis-smalltalk-dev.
Related Issues (20)
- Problems installing dependency PetitParser HOT 3
- Poblems upgrading HOT 1
- Sound / PreferenceSet error HOT 2
- Severe lag in mouse clicks, menu highlighting, and keyboard while running Cuis in VirtualBox
- Preferences no longer respond to #enable: & #disable: ?
- Mouse events from dragged morph leak to underlying morphs
- Halo menues don't work if a menu of the Halo of another object is oppened HOT 2
- Cuis syntax changes still possible? HOT 1
- Remove the need for #asByteString HOT 3
- make #shuffled and #sorted produce same type HOT 2
- #asciiValue doesn't work for $(20) and $(09) HOT 2
- Browser close on: Sample04Pacman new openInHand HOT 4
- Command line launch warning on macOS Ventura 13.0.1 : NSButton height 32.0 instead of max 30 HOT 1
- MessageNotUnderstood: ObjectExplorer>>autoSelectString HOT 1
- Moving the progress bar as updates load is laggy and creates temporary duplicate artifacts of the bar
- Taskbar is not topmost
- WebClient doesn't handle Unicode URLs HOT 5
- Copy to Clipboard non working
- Create missing method from Debugger HOT 2
- NonBooleanReceiver on "browse protocol" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuis-smalltalk-dev.