streched panel and panelw?

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.

thanks ben.

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.

screenwToPanelwExportBug.toe (2.47 KB)

Should I also post this in the bugs forum?
thanks
A

Hi Achim.

Ive now changed the behavious so that the stretch only applies to the parent container, not the children.
Look for it in build 1119 or later.

Cheers
Rob

Hey rob, that’s gonna be helpful. Thanks

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.

any news on this and the other panel related issues (paneloffset,…)?

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.

could someone please comment on this issue?

Hi Achim.
Im looking at it now.

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.

Cheers
Rob

hey rob, isn’t that the change you made for b1119 in order to fix the issue in the first post of this topic?

Please also have a look at the first post’s file so that it’ll work correctly with the new solution.

thx
Achim

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.

thanks ben and rob! Any chance that the build coming up in two days will also have the malcolm’s cloning enhancements?

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.

too bad, hope a 1500+ build is not that far ahead. thx.