Re: Setting usize to (0,0)



>
> set_usize(0) doesn't shrink, it sets the size to 'no other size than 0'.
>

Sure, so this means it should have an initial size of (0, 0), unless placed
in to a container where it can expand to its allocation.  set_usize is
totally disregarding zero as a value, is this a bug?  Most of our containers
are set to have their children expandable, so the usize is treated as its
minimum size, or actual size in the case where the container's child
allocations are non-expandable.

>
> You wouldn't use set_usize() for this, but you'd request a size of 0,0
> and accept the allocation inside the widget. set_usize() is called upon
> the widget (externally, mostly).

Setting the user size to (1, 1) works in all cases, (1, 0) doesn't, why do I
have to perform I size request for a zero value when all positive values
work correctly with set_usize?

My real question is, why isn't zero a valid value, particularly if the
container it is placed in allows the child to expand?

Ian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]