EFL - custom button

76 Views Asked by At


I'm porting a C-language kiosk application to a x86 machine, running Ubuntu 16.
I'm using the EFL GUI framework (version 1.20.7) - it is new to me.
I managed to add an icon to a button, but the button still has a frame and the 'pressed' GUI animation.
I want only my custom-button-image to be visible, possibly switching between 2 images: 'pressed' and 'unpressed' (upon matching events, of by configuration... maybe edge???).
I don't mind using any widget (image, etc.), if it has the callbacks for relevant events.
Thanks.

1

There are 1 best solutions below

2
On BEST ANSWER

Rather than using a button object which has a standard theme you could just use an image (evas_object_image_add) and change the image on mouse down/up (evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN, ...)).

You should note the difference between evas_ and elm_ namespaces - elm (the toolkit) has a standard theme and evas (the render library) is a "blank canvas" :). An Evas Object can be added to the UI just like any other Elm widget.