Page MenuHomePhabricator

Invalid sizes
Closed, ResolvedPublic

Description

Sometimes the items returned from the factory still have a min size of 0x0, which is related to edje not having set the correct min size yet. For now i made it fallback to the parent model size. However, After the item has its minsize and is different to 0x0, we need to tell that to the position manager, or the cache-calculated sizes are completly invalid.

Related Objects

StatusAssignedTask
OpenNone
Resolvedbu5hm4n
bu5hm4n created this task.Sep 2 2019, 8:24 AM
bu5hm4n triaged this task as High priority.
zmike added a comment.Sep 3 2019, 7:26 AM

I would expect all items to have a 0x0 size from the factory since the group calc won't have been triggered by that point. Based on the factory design/implementation, that seems to be intentional.

zmike added a comment.Sep 3 2019, 12:14 PM

So if I understand, what we need still is handling for layout-based sizes? And then enforcing only the use of parent model sizes if they're provided?

I am meanwhile quite confused when it comes to sizing in this widget, what should we now do, rely *always* on parent model sizes if they are provided, and if not, try to figure out the item sizes ?
The problem with this stragety is, that in cases where we do not yet have the item ready, we do not know the size, and there we need some sort of size for it. And if we rely on the item sizes, then there is no parent, so also no parent size. So i do not know if this stragety works for us.

zmike added a comment.Sep 4 2019, 8:05 AM

I am meanwhile quite confused when it comes to sizing in this widget, what should we now do, rely *always* on parent model sizes if they are provided, and if not, try to figure out the item sizes ?

Yes, that's the idea

The problem with this stragety is, that in cases where we do not yet have the item ready, we do not know the size, and there we need some sort of size for it. And if we rely on the item sizes, then there is no parent, so also no parent size. So i do not know if this stragety works for us.

I don't think that's an issue? Just create a single dummy item when the model is set if there's no sizing info and cache its size internally.

@cedric have you pulled in these patches ?

In a sense yes.

bu5hm4n closed this task as Resolved.Sep 25 2019, 8:13 AM
bu5hm4n claimed this task.

Good.