[elm_colorselector]: take padding values on theme change.
authorshilpa singh <shilpa.singh@samsung.com>
Sat, 10 Mar 2012 13:14:10 +0000 (18:44 +0530)
committershilpa singh <shilpa.singh@samsung.com>
Sat, 10 Mar 2012 13:14:10 +0000 (18:44 +0530)
src/lib/elm_colorselector.c

index aa124d8..c605ddb 100644 (file)
@@ -128,6 +128,9 @@ _theme_hook(Evas_Object *obj)
    Eina_List *elist;
    Elm_Color_Item *item;
    int i;
+   const char *hpadstr, *vpadstr;
+   unsigned int h_pad = DEFAULT_HOR_PAD;
+   unsigned int v_pad = DEFAULT_VER_PAD;
 
    if ((!wd) || (!wd->sel)) return;
 
@@ -135,6 +138,11 @@ _theme_hook(Evas_Object *obj)
                          elm_widget_style_get(obj));
    _elm_theme_object_set(obj, wd->sel, "colorselector", "bg",
                          elm_widget_style_get(obj));
+   hpadstr = edje_object_data_get(wd->base, "horizontal_pad");
+   if (hpadstr) h_pad = atoi(hpadstr);
+   vpadstr = edje_object_data_get(wd->base, "vertical_pad");
+   if (vpadstr) v_pad = atoi(vpadstr);
+   elm_box_padding_set(wd->box, h_pad, v_pad);
    EINA_LIST_FOREACH(wd->items, elist, item)
      {
         elm_layout_theme_set(VIEW(item), "colorselector", "item", elm_widget_style_get(obj));