I just don’t understand how to really use the panel layout/strech options.
Please open the file and open panel for /project1. The panel is 500 px wide. If you look in the right pane, you see that “gadget1” has “Stretch Horizontal” on and that inside “gadget1” the two COMPs use screenw to get at the streched size. Combined, both COMPS (label and parm) are 500 px wide, but in the opened panel they are bigger? layout.toe (2.88 KB)
The problem is that gadget1 has a width of 400. The panel is then being stretched 25% to 500, so the screenw ends up being 500. The children get stretched by this same amount, so the 150 and 350 pixel widths are stretched 25% to 188 and 437 respectively. Stretch Horizontal and Vertical only change the screenw/h of the panel.
I would set gadget1’s Width parameter using this expression:
panel(".", "screenw")
This sets the actual width of the panel to be equal to the screenw value that is obtained from the stretching. Using this, children inside can more easily be aligned, centered, and positioned properly.
So children get stretched by the same amount. Could/should that be optionally?
Also, I believe it would be more intuitive, if stretch would also change panelw/h. Maybe it should even disable the panelw/h parameters and stuff the stretched value into those.
Unfortunately I can’t use any expression’s at the top level (i.e. in panelw parameter), as theres no way to sync up any top level parameters between a clone and it’s master. So I need to export to panelw from inside. But that fails.
Please open the file, open the panel for “/project1” and then run “/text1”
Now look inside “/project1”. The “foo” COMP as a panelw of 0. You need to step inside it and toggle the export flag for panel1 to get the actual panelw.
so I checked it in 1191 and i still can’t get it to work reliably.
Please open the panel for “/project1”
“/project1/gadget1” is stretched to the the new width (500 px)
but
“/project1/gadget1/parm” is stretched to 300 px instead of the necessary 400 px
Seems like it uses the parent’s panelw instead of the parent’s screenw layoutBug.1.toe (2.58 KB)
Actually it seems gadget1 jumps back to 400 (old width) if you open it’s controlpanel, so there is a weird bug in there. I’ll have Rob look at it, he is working on panel fixes right now.
Sorry to bring this up again, but can’t really work on any UI stuff in the current state and the panel(“.”,“screenw”) workaround is not working in my case (it even crashes touch). I can somehow work around the broken paneloffset, but the stretching issue really stops any UI development.
Well it seemed stretching wasn’t being applied recursively, causing the problem.
We’re going to test out the new solution for a bit to make sure it doesn’t break any existing layouts.
Hey Achim, I just tested both the layout1.toe and layout.toe (the first file) and they both are displaying the expected result. The fix has not been added to the new experimental build 1413, but a build will be posted in the next 2 days that includes it.
Nah, my cloning changes are in the 1500+ series of builds. Not sure when we’re going to release a new version from that branch. We’re working on really tightening up the 1400 series so we have a very stable build as our official build.