I need to allow selecting colors for a list’s items and therefore to show the selected colors in lists, details and dialogs. I looked for some color indicator component but did not find any (looks like it does not exist). What can I use for this?
The color indicator will be shown inside items of Genlist (in my app Genlist is used for lists, details and dialogs/forms). This can be just a square or circle (filled with the selected color). But, this can also be some more complicated component like a colored button without label. Is there anything like this?
I’m trying to implement such indicator using other components, but it does not work for some reason:
Colored square
Thus, I was trying to use Bg in elm.swallow.end of a Genlist item of the “default” item style:
This renders a circle with white background (I can see shadows). But, I do not understand, how can I change the color of this widget.
The theme “elm/colorselector/item/default” can be checked here: https://git.enlightenment.org/core/efl.git/tree/data/elementary/themes/edc/elm/colorsel.edc
The source code of the ColorSelector can be found here: https://git.enlightenment.org/core/efl.git/tree/src/lib/elementary/elm_colorselector.c
Any of these options or any other new option will work for me. As I wrote, I just need some color indicator. Please help.
Color indicator in Native API
Colored square
static Evas_Object* gl_content_get_cb(void* data, Evas_Object* obj, const char* part) { if (!strcmp(part, "elm.swallow.end")) { Evas_Object* bg = elm_bg_add(obj); elm_bg_color_set(bg, 66, 162, 206); return bg; } }Circle widget from ColorSelector
static Evas_Object* gl_content_get_cb(void* data, Evas_Object* obj, const char* part) { if (!strcmp(part, "elm.swallow.end")) { Evas_Object* layout = elm_layout_add(obj); elm_layout_theme_set(layout, "colorselector", "item", "default"); return layout; } }BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio