Page MenuHomePhabricator

Efl.Ui.Factory problem
Open, HighPublic

Description

the API building is used in factory to set properties and so on. building is called between constructor and finalize, which means, the theme will be reapplied later on. And the properties need resetting, later style setting also requires reapplying of the properties. What should we do about that?

bu5hm4n created this task.Mon, Aug 26, 5:47 AM
bu5hm4n triaged this task as High priority.
cedric added a subscriber: cedric.Tue, Aug 27, 2:45 PM

We could delay fetching value from model to until we set the theme, but before we do any calculation,I would think.

The problem is not the point of time when we fetch the value, the problem is when we set the values. We set them before edje can understand them, and later on when the theme arrives, NULL values will overwrite what was set before.

How do you think about having 2 APIs:

  • constructing (which is called during construction time)
  • building (which is called after finalizer is called)

With that we could cover all of our corner cases ?

cedric added a comment.Mon, Sep 2, 9:15 PM

I think it makes sense anyway as their will be always case where you might want to do some call after construction. Just take note that the caching factory will need to do that call too when it gets its object out of the cache, I would think.

zmike added a subscriber: zmike.Tue, Sep 3, 9:01 AM

The problem is not the point of time when we fetch the value, the problem is when we set the values. We set them before edje can understand them, and later on when the theme arrives, NULL values will overwrite what was set before.

What's the specific case here? I think this should have been solved by my edje caching improvements

There is the theoretical problem that we have construction properties in EFL and properties and need to be called after finalize.
More practical: The caching in edje does not work here, as the property binding here gets the part "text" of the theme object, and then sets the property "text" on it. That only can work after theme is set (if i understood things correctly in the past, i might also be wrong with that.).

zmike added a comment.Fri, Sep 13, 7:32 AM

There is the theoretical problem that we have construction properties in EFL and properties and need to be called after finalize.
More practical: The caching in edje does not work here, as the property binding here gets the part "text" of the theme object, and then sets the property "text" on it. That only can work after theme is set (if i understood things correctly in the past, i might also be wrong with that.).

This seems like it should be pretty trivial to handle by doing something like:

  • in efl_ui, check whether layout object is loaded
  • if not loaded, set data item with part name onto layout object containing the property value
  • edje can then migrate the property values onto the parts during load
bu5hm4n removed a subscriber: bu5hm4n.Thu, Sep 19, 7:50 AM
bu5hm4n added a subscriber: bu5hm4n.