forked from enlightenment/enlightenment
parent
8e9b7c0b2c
commit
11e83d5132
|
@ -199,6 +199,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
* rest is relative to the whole object
|
||||
* (because its not specified) */
|
||||
}
|
||||
color_class: "border_top";
|
||||
image { /* define the image to use */
|
||||
normal: "bd_top.png"; /* the image */
|
||||
border: 2 2 2 2; /* border scaling attributes. this is the
|
||||
|
@ -223,6 +224,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
color_class: "border_bottom";
|
||||
image {
|
||||
normal: "bd_bottom.png";
|
||||
border: 2 2 0 0; /* the left and right pixels are not to
|
||||
|
@ -594,6 +596,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 0;
|
||||
to: "top";
|
||||
}
|
||||
color_class: "border_top_hilight";
|
||||
image {
|
||||
normal: "bd_top_hilight.png";
|
||||
}
|
||||
|
@ -1448,6 +1451,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 -1;
|
||||
to_y: "title_base";
|
||||
}
|
||||
color_class: "border_top";
|
||||
image {
|
||||
normal: "bd_top.png";
|
||||
border: 2 2 2 2;
|
||||
|
@ -1465,6 +1469,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
color_class: "border_bottom";
|
||||
image {
|
||||
normal: "bd_bottom.png";
|
||||
border: 2 2 0 0;
|
||||
|
@ -1749,6 +1754,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 0;
|
||||
to: "top";
|
||||
}
|
||||
color_class: "border_top_hilight";
|
||||
image {
|
||||
normal: "bd_top_hilight.png";
|
||||
}
|
||||
|
@ -2528,6 +2534,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 -1;
|
||||
to_y: "title_base";
|
||||
}
|
||||
color_class: "border_top";
|
||||
image {
|
||||
normal: "bd_top.png";
|
||||
border: 2 2 2 2;
|
||||
|
@ -2804,6 +2811,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 0;
|
||||
to: "top";
|
||||
}
|
||||
color_class: "border_top_hilight";
|
||||
image {
|
||||
normal: "bd_top_hilight.png";
|
||||
}
|
||||
|
@ -3377,6 +3385,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 -1;
|
||||
to_y: "title_base";
|
||||
}
|
||||
color_class: "border_top";
|
||||
image {
|
||||
normal: "bd_top.png";
|
||||
border: 2 2 2 2;
|
||||
|
@ -3394,6 +3403,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
color_class: "border_bottom";
|
||||
image {
|
||||
normal: "bd_bottom.png";
|
||||
border: 2 2 0 0;
|
||||
|
@ -3632,6 +3642,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 0;
|
||||
to: "top";
|
||||
}
|
||||
color_class: "border_top_hilight";
|
||||
image {
|
||||
normal: "bd_top_hilight.png";
|
||||
}
|
||||
|
@ -4301,6 +4312,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 -1;
|
||||
to_y: "title_base";
|
||||
}
|
||||
color_class: "border_top";
|
||||
image {
|
||||
normal: "bd_top.png";
|
||||
border: 2 2 2 2;
|
||||
|
@ -4531,6 +4543,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
offset: -1 0;
|
||||
to: "top";
|
||||
}
|
||||
color_class: "border_top_hilight";
|
||||
image {
|
||||
normal: "bd_top_hilight.png";
|
||||
}
|
||||
|
@ -5633,6 +5646,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
align: 0.5 0.0;
|
||||
color_class: "menu_base";
|
||||
image {
|
||||
normal: "base_bg.png";
|
||||
border: 2 2 2 2;
|
||||
|
@ -6228,6 +6242,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
part { name: "base";
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
color_class: "shelf_base";
|
||||
image.normal: "base_bg.png";
|
||||
image.border: 2 2 2 2;
|
||||
fill.smooth: 0;
|
||||
|
@ -6563,6 +6578,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
part { name: "base";
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
color_class: "shelf_base";
|
||||
image.normal: "shelf_alt_bg.png";
|
||||
fill.smooth: 0;
|
||||
}
|
||||
|
@ -11171,6 +11187,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
part { name: "base";
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
color_class: "fileman_base";
|
||||
image.normal: "dia_grad.png";
|
||||
fill {
|
||||
smooth: 0;
|
||||
|
@ -16416,6 +16433,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
part { name: "base";
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
color_class: "dialog_base";
|
||||
image.normal: "dia_grad.png";
|
||||
fill {
|
||||
smooth: 0;
|
||||
|
@ -16568,6 +16586,7 @@ collections { /* begin the collection of edje groups that are in this file */
|
|||
part { name: "base";
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
color_class: "configure_base";
|
||||
image.normal: "dia_grad.png";
|
||||
fill {
|
||||
smooth: 0;
|
||||
|
@ -20307,6 +20326,7 @@ group { name: "e/toolbar/default/base";
|
|||
part { name: "base0";
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
color_class: "frame_base";
|
||||
image.normal: "dia_grad.png";
|
||||
rel1.to: "over";
|
||||
rel2.to: "over";
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
#include "e.h"
|
||||
|
||||
typedef struct _CFColor_Class CFColor_Class;
|
||||
|
@ -85,6 +88,8 @@ const CFColor_Hash _mod_hash[] =
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
Eina_List *color_classes;
|
||||
|
||||
static void *_create_data (E_Config_Dialog *cfd);
|
||||
static void _free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
|
@ -93,6 +98,7 @@ static int _adv_apply_data (E_Config_Dialog *cfd, E_Config_Dialog
|
|||
static Evas_Object *_adv_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
|
||||
static void _fill_data_hash (E_Config_Dialog_Data *cfdata, const CFColor_Hash *cfhash);
|
||||
static void _fill_data_list (E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_data_basic (E_Config_Dialog_Data *cfdata);
|
||||
|
||||
static void _load_color_classes (Evas_Object *obj, E_Config_Dialog_Data *cfdata);
|
||||
|
@ -150,9 +156,13 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
e_color_update_rgb(cfdata->color2);
|
||||
e_color_update_rgb(cfdata->color3);
|
||||
|
||||
color_classes = edje_color_class_list();
|
||||
|
||||
_fill_data_hash(cfdata, _wm_hash);
|
||||
_fill_data_hash(cfdata, _wid_hash);
|
||||
_fill_data_hash(cfdata, _mod_hash);
|
||||
|
||||
_fill_data_list(cfdata);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -171,6 +181,17 @@ _fill_data_hash(E_Config_Dialog_Data *cfdata, const CFColor_Hash *cfhash)
|
|||
|
||||
if (cfhash[i].key)
|
||||
{
|
||||
Eina_List *l;
|
||||
|
||||
for (l = color_classes; l; l = l->next)
|
||||
{
|
||||
if (!strncmp(cfhash[i].key, l->data, strlen(cfhash[i].key)))
|
||||
{
|
||||
color_classes = eina_list_remove_list(color_classes, l);
|
||||
E_FREE(l->data);
|
||||
}
|
||||
}
|
||||
|
||||
cfc->key = eina_stringshare_add(cfhash[i].key);
|
||||
cfc->name = eina_stringshare_add(_(cfhash[i].name));
|
||||
cc = e_color_class_find(cfc->key);
|
||||
|
@ -213,6 +234,70 @@ _fill_data_hash(E_Config_Dialog_Data *cfdata, const CFColor_Hash *cfhash)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_fill_data_list(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Eina_List *l;
|
||||
CFColor_Class *cfc;
|
||||
E_Color_Class *cc;
|
||||
|
||||
if (eina_list_count(color_classes))
|
||||
{
|
||||
cfc = E_NEW(CFColor_Class, 1);
|
||||
cfc->enabled = 0;
|
||||
cfc->key = NULL;
|
||||
cfc->name = eina_stringshare_add(_("Other"));
|
||||
|
||||
cfdata->classes = eina_list_append(cfdata->classes, cfc);
|
||||
}
|
||||
|
||||
for (l = color_classes; l; l = l->next)
|
||||
{
|
||||
cfc = E_NEW(CFColor_Class, 1);
|
||||
cfc->enabled = 0;
|
||||
cfc->key = eina_stringshare_add((char *) l->data);
|
||||
cfc->name = eina_stringshare_add((char *) l->data);
|
||||
|
||||
cc = e_color_class_find(cfc->key);
|
||||
if (cc)
|
||||
{
|
||||
cfc->enabled = 1;
|
||||
cfc->r = cc->r;
|
||||
cfc->g = cc->g;
|
||||
cfc->b = cc->b;
|
||||
cfc->a = cc->a;
|
||||
cfc->r2 = cc->r2;
|
||||
cfc->g2 = cc->g2;
|
||||
cfc->b2 = cc->b2;
|
||||
cfc->a2 = cc->a2;
|
||||
cfc->r3 = cc->r3;
|
||||
cfc->g3 = cc->g3;
|
||||
cfc->b3 = cc->b3;
|
||||
cfc->a3 = cc->a3;
|
||||
}
|
||||
else
|
||||
{
|
||||
cfc->r = 255;
|
||||
cfc->g = 255;
|
||||
cfc->b = 255;
|
||||
cfc->a = 255;
|
||||
cfc->r2 = 0;
|
||||
cfc->g2 = 0;
|
||||
cfc->b2 = 0;
|
||||
cfc->a2 = 255;
|
||||
cfc->r3 = 0;
|
||||
cfc->g3 = 0;
|
||||
cfc->b3 = 0;
|
||||
cfc->a3 = 255;
|
||||
}
|
||||
|
||||
cfdata->classes = eina_list_append(cfdata->classes, cfc);
|
||||
E_FREE(l->data);
|
||||
}
|
||||
|
||||
color_classes = eina_list_free(color_classes);
|
||||
}
|
||||
|
||||
static void
|
||||
_fill_data_basic(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue