Page MenuHomePhabricator

EFL "new" theme for EO objects
Open, HighPublic

Description

See T5301

As we're moving towards EFL 2 and the EO API is being used instead of the legacy API, the actual theme API also needs to be modified to implement the new features in EO. And remove the unused features from legacy. So, in order to make it "simple" we may want to keep the same code for most widgets, but use different EDC groups to back EO vs. legacy objects.

This means that an application using EO API will not be using an old theme, and may even warn the user if the theme is too old. It should work, but may look terrible (eg. custom theme is white but new default theme is mostly black: your efl_add button is then black).

Thus, we should:

  1. Create a new default-new.edj file. Make elementary load this file as well as default.edj.
  2. Create new groups for the EO widgets, eg. "efl/button/default". All group, part, signal, message, text class, color class, and size class names need to match this "efl/" pattern.
  3. Add if () in the C code of the widgets to switch between EO and Legacy strings. This will likely be doable with macros or simple get() functions.
  4. Make extensive use of subgroups and higher level Edje features to design the widgets. See also T5716.

We might only need to support default styles at first, as except genlist most other widgets have only a single style that is really used. More styles can be added later. Genlist is no more in EO (replaced by an MVVM-backed list).

jpeg created this task.Aug 1 2017, 1:44 AM
jpeg updated the task description. (Show Details)
jpeg triaged this task as High priority.
cedric added a comment.Aug 1 2017, 9:09 AM

Just in the name of less work for next release, can we get away with no new edje file and just use alias for group in the default theme or is there something I am missing ?

raster added a comment.Aug 6 2017, 6:03 PM

no - because @jpeg is also talking about making all signals, swallows, text parts, and so on 100% consistentacross all objects.

raster added a comment.Aug 6 2017, 6:11 PM

also a new file means at last given current edje costs we don't blow out costs with N new groups for the index for "legacy only" apps. for eo only apps they dont need the "legacy theme". since we enforce looking at default.edj as a last option for a list of themes we can make it a "look at 2 files" (yes it means loading both and there are caches to help with this but one we cycle the unused one out of cache it'll drop usage again).

jpeg reassigned this task from woohyun to singh.amitesh.Sep 19 2017, 2:55 AM
jpeg added a subscriber: woohyun.
jpeg added a comment.Dec 11 2017, 7:12 PM

Some patches have been merged:
e29b9e5371 multibuttonentry: Add theme for legacy multibuttonentry.
300ded6c30 efl_ui_text: apply new theme logic and use constructor/destructor
bbb70f0e9b efl_ui_clock: Apply lazy edc.
9d2141b5a3 efl_ui_multibuttonentry: Apply lazy edc, code clean up.
e8a00f7c15 efl/calendar.edc: fix redefinition error
cd79611626 efl_ui_calendar: apply new theme policy
e7e375937b elm: introduce ELM_PART_OVERRIDE_PARTIAL
5e4abdb873 efl_ui_popup: apply new theme logic for alert_scroll, alert_text
22c5f771be efl_ui_popup: apply new theme logic for efl_ui_popup
dd4467505e efl_ui_widget: find new edc resource for efl_ui_widgets
d3b74d4639 efl theme: Add heirarchy for new theme

jpeg reassigned this task from singh.amitesh to taxi2se.Jan 17 2018, 9:30 PM

I think @taxi2se handled a lot of this already.

zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:54 AM
bu5hm4n edited projects, added efl: widgets; removed Restricted Project.Jun 11 2018, 9:10 AM
zmike added a subscriber: zmike.

A #Goal ticket should not be set to a milestone.