Closed MangelMaxime closed 2 months ago
Can you try adding stretchToParentHeight: false
to the BoxLayout's options that is holding the expanders?
I'm pretty sure the behavior you are experimenting is related to BoxLayout and not Expanders.
Adding stretchToParentHeight: false
does nothing.
And you are probably reason about the behavior being related to BoxLayout because I tried to use BoxLayout to structure my app and I gave the same behavior whenever the BoxLayout is going taller.
Just to complete, if we replace the Expander by Menu + SubMenuItem the behavior is correct.
Well, I just noticed that you have two BoxLayouts.
Set stretchToParentHeight: false
to both (or just the outermost one), and it should fix the issue.
You also might not need the horizontal box, or should use a GridLayout if you have a complex UI to design.
Ok so I needed to put stretchToParentHeight: false
on the outermost BoxLayout.
And yes, should probably try to use the GridLayout but I am not sure if this would make cleaner or not the GUI. Nevermind, thanks for your help @Breush
I let you close this issue if you think that the current behavior is OK.
I took the same code as from Photonui expander's doc and put it inside a window.
The behavior is strange because the expander are not stacked together and split the space at 33% each.
Here is my code:
JavaScript:
My CSS: (should not interfere)
Possible solutions:
Here are the css rules that I find controlling this behavior:
height: 100%;
from top BoxLayout element.flex-grow: 1;
from .photonui-boxlayout > .photonui-boxlayout-itemI just give this possible solutions like that but I didn't think about their usage.