Unify leaflet and flap automatic folding
Current HdyLeaflet
uses natural sizes for folding and HdyFlap
uses minimum sizes.
However, I think each of them should support both and be used depending on the situation:
- Leaflet needs minimum sizes to avoid folding immediately when a label inside is ellipsized
- Flap needs natural sizes to be able to fold multiple flaps in sync (also requires !684 (merged))
There's already a precedent in GTK for selecting between these modes in GtkScrollablePolicy
.
What we could do API-wise is to have:
For HdyFlap
:
- Split
HDY_FLAP_FOLD_POLICY_AUTO
intoHDY_FLAP_FOLD_POLICY_MINIMUM
andHDY_FLAP_FOLD_POLICY_NATURAL
OR
- Add a separate sizing policy property as an enum containing minimum|natural values, though I think that's a worse variant as it only applies to auto policy.
For HdyLeaflet
:
- Add a sizing policy (or fold policy?) property
OR
- Have a fold policy (never|minimum|natural|always) like in
HdyFlap
CC @aplazas
Edited by Alice Mikhaylenko