HorizontalLayout inside VerticalLayout - Problem when Reisizes Vertically

Hi all!

I Have some CustomComponentes, that is basically, a VerticalLayout.

Inside this compoentes, I have a Toolbar (that is only a HorizontalLayout to display buttons).

When the VerticalLayout that contains this toolbar resizes vertically, the horizontal layouts looses about two 5 pixels. If I resize the Window Manually, the toolbar backs to the full width…

How can I avoid that?

This the Layout before get resized:


And after:


Thanks for any help!

How have you specified the width of your toolbar layout (HorizontalLayout)? You could try setting that to 100% wide and after your buttons add for example empty Label component with expandRatio 1 so that it will take all the available space in the layout. This way your toolbar would be 100% wide, buttons on the left side of it and empty space taken up by a component.

It would be interesting to see the code by the way, layout width changing as you described sounds like a bug to me.