Change theme background color

Change theme background color

BY 29 Jul 2015 Native Application Development

Hi,

I’m trying to change the background color of a Naviframe; in the .edc file I have:

collections {
   group { name: "main";
      parts {
         part { name: "txt_title";
            type: TEXT;
            mouse_events: 0;
            description { state: "default" 0.0;
               align: 0.0 0.0;
               rel1 { relative: 0.0 0.0; }
               rel2 { relative: 0.0 0.0; }
               text { font: "Tizen:style=regular"; size: 40; min: 1 1; }
               color: 255 201 117 255;
            }
         }
      
         // New part for backgroud color
         part { name: "title_bg"; 
            type: RECT; 
            scale: 1; 
            description   { state: "default" 0.0; 
            min: 1 100; 
            align: 0.0 0.0; 
            fixed: 0 1; 
            rel1 { relative: 0.0 0.0; } 
            rel2 { relative: 1.0 1.0; }
            color: 255 201 117 255; 
         } 
        } 
      }
   }
}

 

In C, I load this file in this way:

elm_theme_extension_add(NULL, edj_path);
elm_object_style_set(widget, "main");

But nothing happens…

Do you know what I’m doing wrong?

Thanks.

Written by