Aligners Ignore "mode" Setting

hello,

while building my tool’s gui, i ran into problems with aligners and would like to have your advice.
i am not sure if this is a bug in the viewbuilder or if it’s again me doing something wrong.

the problem is that, in rows or columns, the horizontal and vertical aligners don’t seem to work properly.
in the example tool, the vertical_aligner simply ignores “center”, “bottom” or “distribute”.

i did not include all possibilites in this tool, but i tried to make the “center” work in several different cases and it rarely worked.

the aligners seem to work fine on views which are not inside colums or rows, thus the aligners wrapping around them, while they don’t have a parent.
they did also work on colums, when the nesting didn’t go deeper than one or two parents (i am not sure about this atm, sorry).

i really have no clue on how to solve this.

thanks!

EDIT: if i wasn’t clear enough about where exactly the problem is: the valuebox in the example should be vertically centered, but instead it stays on the top, no matter what the “mode” is set to.

UPDATE

i managed to make the vertical_aligner center the valuebox with a small hack. though, this hack isn’t obvious at all. and it raises more questions.

i changed this

  
 vb:column{  
 margin = CONTROL_MARGIN,  
 spacing = CONTROL_SPACING,  
 style = "group",  
 height = "100%",  
  
 -- this aligner does not work with center, bottom or distribute  
 vb:vertical_aligner{  
 mode = "center",  
 height = "100%",  
 vb:valuebox{  
 min = 1,  
 max = 100,  
 value = 100,  
 },  
 },  
 },  
  

to

  
 vb:column{  
 margin = CONTROL_MARGIN,  
 spacing = CONTROL_SPACING,  
 style = "group",  
 height = "100%",  
  
 -- this space makes the vertical_aligner center the valuebox  
 vb:space{  
 height = "1%",  
 },  
 vb:vertical_aligner{  
 -- mode or height settings are irrelevant to this  
 -- mode = "center",  
 -- height = "100%",  
 vb:valuebox{  
 min = 1,  
 max = 100,  
 value = 100,  
 },  
 },  
 },  
  

i simply inserted a dummy space into the column. why did i even try this? because i already made the experience that it needs two elements for the aligner to do something.
so it seems, when there are two elements in the same column, the aligner works. but then, it automatically centers, no matter what or even if the “mode” is set. “justify”, “distribute”, “bottom”, “top” still have no effect. the api doc on the other hand clearly says that “top” is the default for vertical_aligner, so it seems weird the valuebox gets centered.

what is going on here? :confused:

I bump this, because this behavior still persists and I did not get any answers. I also often run into problems with aligners not working at all, even with two children, despite having bigger parents. It’s hard to reproduce, though, because the behavior seems random at times. Maybe I manage to give better examples some time.

Anyone else who tried to build more or less complex GUIs and ran into problems with aligners and also relative value resizing with nested views (another problem I’m just mentioning, because you likely stumble over that too, if you built complex GUIs)?

Yes a lot and i try to avoid aligners as much as possible in those situations i have to work with groups.
Aligners work fine as long as your GUI design is simple, but as soon as it contains different levels of nested groups, they work highly counter-intuitive or simply not at all.