Page MenuHomePhabricator

theme: add a macro file for making themes easier
ClosedPublic

Authored by bu5hm4n on Wed, May 15, 8:51 AM.

Details

Summary

CLICKABLE_SIGNAL_EMITS now can be used to setup all the events required
to have automatically emission of all the clickable events

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bu5hm4n created this revision.Wed, May 15, 8:51 AM
bu5hm4n requested review of this revision.Wed, May 15, 8:51 AM
zmike requested changes to this revision.Wed, May 15, 9:25 AM

This is really good overall, some minor changes needed.

I think the name of the macro could perhaps be changed to something like EFL_UI_CLICKABLE_PART_BIND to indicate that this is an "official" macro and use the same terminology as the class docs. Also it would be good if you could add a quick one-line comment to the macro itself referencing the clickable class and docs.

data/elementary/themes/edc/efl/macros.edc
4

None of these should glob, as that would match double and triple click signals which you are not handling.

8

Why is this duplicated?

This revision now requires changes to proceed.Wed, May 15, 9:25 AM

In efl we have this weird semantics when it comes to signals:
Lets say we have a constant stream of press & unpress onto a edje part, the stream of edje signals is then:

  • mouse,down,1
  • mouse,up,1
  • mouse,down,1,double
  • mouse,up,1
  • mouse,down,1,triple
  • mouse,up,1
  • mouse,down,1
  • mouse,up,1

[and repeating like this]

The problem is that you will only catch every third down signal if you only listen to "mouse,down,1" this came totally unexpected to me tbh.

data/elementary/themes/edc/efl/macros.edc
4

This is a mistake, it should just be mouse,down,1 and mouse,down,1,*

The reason we need both is explained in the main comment

bu5hm4n updated this revision to Diff 22219.Wed, May 15, 9:42 AM

docs docs docs docs

zmike accepted this revision.Wed, May 15, 9:47 AM
This revision is now accepted and ready to land.Wed, May 15, 9:47 AM
Closed by commit rEFL122ca2fa2f92: theme: add a macro file for making themes easier (authored by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyWed, May 15, 9:54 AM
This revision was automatically updated to reflect the committed changes.