On Thu, Feb 16, 2012 at 7:24 AM, SHILPA ONKAR SINGH <shilpa.si...@samsung.com> wrote: > > Hi All, > > Please find attached patch for new elementary widget elm_colorpalette.c. > > Change description: > New widget colorpalette added. > elm_colorpalette is a color selection widget. > It provides by default, theme specific set of Predefined colors and also > allows to set a series of colors. > The colors can be picked by user from the color set by clicking on any color > rectangle.
how does it compare with existing Colorselector (http://docs.enlightenment.org/auto/elementary/group__Colorselector.html) can't it be made together with colorselector? If you provide only discrete colors instead of letting user define the color based on RGB... maybe you could offer a mode? It would even make sense to offer the last selected colors in the colorselector, and be possible to add new colors to a pre-defined palette using it. Please elaborate as we really don't need even more widgets that partially do one function :-( Maybe add: elm_colorselector_palette_set(Evas_Object *o, const Eina_List *colors); elm_colorselector_palette_grid_set(Evas_Object *o, unsigned columns, unsigned rows); you can even automatically hide/show the palette if colors==NULL || columns == 0 || rows == 0. You can add some flag to hide the current selector: elm_colorselector_palette_only_set(Evas_Object *o, Eina_Bool); Comes to mind other flags, like allow user to add new colors to palette (button? dummy color entry?) Last but not least, never do this: elm_colorpalette_color_set(Evas_Object *obj, Eina_List *color_list) { ... wd->color_list = color_list; ... } you're stealing a parameter and this is not good, as convention is to never do this on setters. Instead take an const Eina_List * and copy the color inside. Or alternatively you can use: elm_colorselector_palette_color_add(Evas_Object *o, int r, int g, int b, int a); which matches evas api. Eventually you can remove the elm_colorselector_palette_grid_set() and make it automatically by having column/row in the palette_color_add: elm_colorselector_palette_color_add(Evas_Object *o, int column, in row, int red, int green, int blue, int alpha); -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel