Hi Gustavo/Tom,

>>how does it compare with existing Colorselector
(http://docs.enlightenment.org/auto/elementary/group__Colorselector.html)
 
ColorPalette supports  two major features.  1. Has theme based predefined set 
of colors 2. Option for user to set own set of colors,
and color can be selected by clicking on any of the color rectangles, basically 
color selector would be secondary
option to user to choose colors from if user does not find required color in 
palette.
 
>>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.
 
Having color palette and color selector separately gives flexibility to 
application in layouting and showing in screen ( mainly small screens )
Application can very much pack these two widgets together and intergrate their 
functionality without much extra effort. 
Or, application can popup color selector if the color palette rectangle is long 
pressed, select a color and update the color palette through provided APIs.
If application prefer to have own set of colors on top of theme color set, its 
very much doable by increasing the item count (  example, increase from default 
5x2 to 5x3).
 
I’m working on following enhancements on top of the current patch,
1.        add APIs to  set/get Individual item color.
2.       Add longpressed signal for individual item.
 
 
>>Please elaborate as we really don't need even more widgets that
partially do one function :-(
 
Its a widget with predefined set of theme based colors, with option to set 
application specific frequently used color set. Color palettes are first 
preference pickers than color selector  which requires more time to select 
specific colors.
 
>>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);
 
Having color palette separate provides flexibility to applications. So, I’m not 
buying above point :)
 
>>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.

got it, will fix this in the next patch :)
 
>>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);
 
Thanks  & Regards
Shilpa Singh 


------- Original Message -------
Sender : Gustavo Sverzut Barbieri<barbi...@profusion.mobi>
Date : Feb 16, 2012 23:52 (GMT+09:00)
Title : Re: [E-devel] : Elementary: Elm_colorpalette - New widget patch

On Thu, Feb 16, 2012 at 7:24 AM, SHILPA ONKAR SINGH
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
------------------------------------------------------------------------------
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

Reply via email to