Languages

Menu
Sites
Language
Getrid of blue gradient background

How to getrid of bluegradient background of the app. And give a solid color for background.

 

Aashish

Responses

5 Replies
Mango Bar

evas_object_color_set   sets color of the given Evas object

evas_object_color_set (naviframe, 0,0,0,1)

1. naviframe is Evas object

2. Last four values are  R, G,B, Alpha value. You can change these values according to your need.

Ashish Patil

Thanks MangoBar.

However something weird happened.

The screen is turning white with this.

 

 

Aashish

Eugene Kurzberg

Gradient background comes from Naviframe item, not Naviframe itself. You should add a background to the layout you are pushing into the Naviframe:

Evas_Object *layout = elm_layout_add(parent);
elm_layout_theme_set(layout, "layout", "application", "default");
 
Evas_Object *bg = elm_bg_add(layout);
evas_object_color_set(bg, 255, 255, 255, 255);
elm_object_part_content_set(layout, "elm.swallow.bg", bg);

elm_naviframe_item_push(naviframe, "Title", NULL, NULL, layout, NULL);
Ashish Patil

Woah... Thanks for the great TIP. This fairly did the trick. Although the Titlebar and the TabBar still seems to look the same till now.

So incase for the Titlebar and the TabBar will it be fine if i do the same for the naviframe item itself ?

Eugene Kurzberg

At this point it is not possible to change the color of Tabbar or Naviframe item title short of implementing your own style for these widgets. Please see my answer to this question regarding the reasons and details. Regarding the Naviframe item title you can hide it using elm_naviframe_item_title_enabled_set() and implement a title in your layout that is pushed to Naviframe. There is also an item style that replaces title bar with swallow part in which you can set any object as content:

Elm_Object_Item *navi_item = elm_naviframe_item_push(naviframe, "Title", NULL, NULL, layout, "empty");
elm_object_item_part_content_set(navi_item, "title", your_content);

In any case I would suggest for you to get familiar with EDC which is ultimatly the most appropriate way to control how everything in your UI is positioned, colored and styled.