forked from enlightenment/efl
elementary/segment_control - patched by Prince Kumar Dubey (prince.dubey@samsung.com)
Change Log: 1. Modification of fix to support dynamic theme changing. 2. Fixed clipping issue, when new segment item/items inserted/added. 3. edc file cleanup and indentation correction. SVN revision: 61576
This commit is contained in:
parent
596ffd9381
commit
4770898fcc
|
@ -618,10 +618,10 @@ collections {
|
|||
type: RECT;
|
||||
scale: 1; //allow scaling
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
min: 480 400;
|
||||
color: 0 0 0 0;
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
visible: 0;
|
||||
min: 480 400;
|
||||
}
|
||||
}
|
||||
part { name: "top_padding";
|
||||
|
@ -632,9 +632,12 @@ collections {
|
|||
visible: 0;
|
||||
min : 250 30; //minimum size for gap filler
|
||||
fixed: 0 1;
|
||||
rel1 { relative: 0 0; }
|
||||
rel2 { relative: 1 0; }
|
||||
color: 0 0 0 0;
|
||||
rel1 {
|
||||
relative: 0 0;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1 0;
|
||||
}
|
||||
align: 0 0;
|
||||
}
|
||||
}
|
||||
|
@ -644,8 +647,15 @@ collections {
|
|||
description {
|
||||
state: "default" 0.0;
|
||||
fixed: 1 1;
|
||||
rel1 { relative: 0.0 1.0; to_x: "bg"; to_y: "top_padding"; }
|
||||
rel2 { relative: 1.0 0.25; to: "bg"; }
|
||||
rel1 {
|
||||
relative: 0.0 1.0;
|
||||
to_x: "bg";
|
||||
to_y: "top_padding";
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 0.25;
|
||||
to: "bg";
|
||||
}
|
||||
align: 0.5 0.0;
|
||||
}
|
||||
}
|
||||
|
@ -659,9 +669,14 @@ collections {
|
|||
max : 250 10;
|
||||
fixed: 1 1;
|
||||
align: 0.5 0;
|
||||
rel1 { relative: 0 1.0; to_y: "segment1"; }
|
||||
rel2 { relative: 1 1.0; to_y: "segment1"; }
|
||||
color: 0 255 0 0;
|
||||
rel1 {
|
||||
relative: 0 1.0;
|
||||
to_y: "segment1";
|
||||
}
|
||||
rel2 {
|
||||
relative: 1 1.0;
|
||||
to_y: "segment1";
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "segment2";
|
||||
|
@ -670,8 +685,15 @@ collections {
|
|||
description {
|
||||
state: "default" 0.0;
|
||||
fixed: 1 1;
|
||||
rel1 { relative: 0.1 1.0; to_x: "bg"; to_y: "segment1_bottom_padding"; }
|
||||
rel2 { relative: 0.9 160/400; to: "bg"; }
|
||||
rel1 {
|
||||
relative: 0.1 1.0;
|
||||
to_x: "bg";
|
||||
to_y: "segment1_bottom_padding";
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.9 160/400;
|
||||
to: "bg";
|
||||
}
|
||||
align: 0.5 0.0;
|
||||
}
|
||||
}
|
||||
|
@ -685,9 +707,14 @@ collections {
|
|||
max : 250 10;
|
||||
fixed: 1 1;
|
||||
align: 0.5 0;
|
||||
rel1 { relative: 0 1.0; to_y: "segment2"; }
|
||||
rel2 { relative: 1 1.0; to_y: "segment2"; }
|
||||
color: 0 255 0 0;
|
||||
rel1 {
|
||||
relative: 0 1.0;
|
||||
to_y: "segment2";
|
||||
}
|
||||
rel2 {
|
||||
relative: 1 1.0;
|
||||
to_y: "segment2";
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "segment3";
|
||||
|
@ -696,8 +723,15 @@ collections {
|
|||
description {
|
||||
state: "default" 0.0;
|
||||
fixed: 1 1;
|
||||
rel1 { relative: 0.2 1.0; to_x: "bg"; to_y: "segment2_bottom_padding"; }
|
||||
rel2 { relative: 0.8 0.6; to: "bg"; }
|
||||
rel1 {
|
||||
relative: 0.2 1.0;
|
||||
to_x: "bg";
|
||||
to_y: "segment2_bottom_padding";
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.8 0.6;
|
||||
to: "bg";
|
||||
}
|
||||
align: 0.5 0.0;
|
||||
}
|
||||
}
|
||||
|
@ -711,9 +745,14 @@ collections {
|
|||
max : 250 10;
|
||||
fixed: 1 1;
|
||||
align: 0.5 0;
|
||||
rel1 { relative: 0 1.0; to_y: "segment3"; }
|
||||
rel2 { relative: 1 1.0; to_y: "segment3"; }
|
||||
color: 0 255 0 0;
|
||||
rel1 {
|
||||
relative: 0 1.0;
|
||||
to_y: "segment3";
|
||||
}
|
||||
rel2 {
|
||||
relative: 1 1.0;
|
||||
to_y: "segment3";
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "segment4";
|
||||
|
@ -722,8 +761,15 @@ collections {
|
|||
description {
|
||||
state: "default" 0.0;
|
||||
fixed: 1 1;
|
||||
rel1 { relative: 0.3 1.0; to_x: "bg"; to_y: "segment3_bottom_padding"; }
|
||||
rel2 { relative: 0.7 340/400; to: "bg"; }
|
||||
rel1 {
|
||||
relative: 0.3 1.0;
|
||||
to_x: "bg";
|
||||
to_y: "segment3_bottom_padding";
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.7 340/400;
|
||||
to: "bg";
|
||||
}
|
||||
align: 0.5 0.0;
|
||||
}
|
||||
}
|
||||
|
@ -737,9 +783,14 @@ collections {
|
|||
max : 250 100;
|
||||
fixed: 1 1;
|
||||
align: 0.5 0;
|
||||
rel1 { relative: 0 1.0; to_y: "segment4"; }
|
||||
rel2 { relative: 1 1.0; to_y: "segment4"; }
|
||||
color: 0 255 0 0;
|
||||
rel1 {
|
||||
relative: 0 1.0;
|
||||
to_y: "segment4";
|
||||
}
|
||||
rel2 {
|
||||
relative: 1 1.0;
|
||||
to_y: "segment4";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35893,38 +35893,6 @@ collections {
|
|||
}
|
||||
}
|
||||
group { name: "elm/segment_control/item/default";
|
||||
data.item: "label.wrap.part" "label.bg";
|
||||
styles {
|
||||
style { name: "seg_text_style_normal";
|
||||
base: "font=Sans font_size=16 style=shadow \
|
||||
shadow_color=#2924224d \
|
||||
align=center \
|
||||
color=#ffffffff wrap=char text_class=label";
|
||||
tag: "br" "\n";
|
||||
tag: "hilight" "+ font=Sans:style=Bold";
|
||||
tag: "tab" "\t";
|
||||
}
|
||||
style { name: "seg_text_style_selected";
|
||||
base: "font=Sans:style=Bold font_size=16 style=shadow \
|
||||
shadow_color=#aaaaaa4d \
|
||||
align=center \
|
||||
color=#111111ff wrap=char text_class=label";
|
||||
tag: "br" "\n";
|
||||
tag: "hilight" "+ font=Sans:style=Bold";
|
||||
tag: "b" "+ font=Sans:style=Bold";
|
||||
tag: "tab" "\t";
|
||||
}
|
||||
style { name: "seg_text_style_disabled";
|
||||
base: "font=Sans:style=Medium font_size=16 style=shadow \
|
||||
shadow_color=#2924224d \
|
||||
align=center color=#2924224d \
|
||||
wrap=char text_class=label";
|
||||
tag: "br" "\n";
|
||||
tag: "hilight" "+ font=Sans:style=Bold";
|
||||
tag: "b" "+ font=Sans:style=Bold";
|
||||
tag: "tab" "\t";
|
||||
}
|
||||
}
|
||||
images {
|
||||
image: "seg_single_pressed.png" COMP;
|
||||
image: "seg_single_selected.png" COMP;
|
||||
|
@ -36072,13 +36040,13 @@ collections {
|
|||
scale: 1;
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
visible: 0;
|
||||
align: 1.0 0.0;
|
||||
rel1.relative: 1.0 0.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
min: 2 2;
|
||||
max: 2 2;
|
||||
fixed: 1 0;
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
part { name: "padding_top";
|
||||
|
@ -36086,13 +36054,13 @@ collections {
|
|||
scale: 1;
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
visible: 0;
|
||||
align: 0.0 0.0;
|
||||
rel1.relative: 0.0 0.0;
|
||||
rel2.relative: 1.0 0.0;
|
||||
min: 2 2;
|
||||
max: 2 2;
|
||||
fixed: 0 1;
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
part { name: "padding_bottom";
|
||||
|
@ -36100,13 +36068,13 @@ collections {
|
|||
scale: 1;
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
visible: 0;
|
||||
align: 1.0 1.0;
|
||||
rel1.relative: 0.0 1.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
min: 2 2;
|
||||
max: 2 2;
|
||||
fixed: 0 1;
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
part { name: "icon.bg";
|
||||
|
@ -36114,7 +36082,7 @@ collections {
|
|||
scale: 1;
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
visible: 1;
|
||||
visible: 0;
|
||||
fixed: 1 0;
|
||||
rel1 {
|
||||
to_x: "padding_left";
|
||||
|
@ -36126,7 +36094,6 @@ collections {
|
|||
relative: 1.0 1.0;
|
||||
}
|
||||
align: 0.0 0.5;
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
part { name: "padding_icon_text";
|
||||
|
@ -36134,6 +36101,7 @@ collections {
|
|||
scale: 1;
|
||||
mouse_events: 0;
|
||||
description { state: "default" 0.0; //when only icon or no icon is there
|
||||
visible: 0;
|
||||
align: 0.0 0.0;
|
||||
rel1 {
|
||||
to: "icon.bg";
|
||||
|
@ -36145,7 +36113,6 @@ collections {
|
|||
}
|
||||
fixed: 1 0;
|
||||
min: 0 0;
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
description { state: "icononly" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
|
@ -36249,8 +36216,14 @@ collections {
|
|||
fixed: 1 1;
|
||||
min: 1 1;
|
||||
align: 0.0 0.5;
|
||||
rel1 { relative: 0.0 0.0; to: "segment";}
|
||||
rel2 { relative: 1.0 1.0; to: "segment";}
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
to: "segment";
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
to: "segment";
|
||||
}
|
||||
color: 255 255 255 150;
|
||||
}
|
||||
description { state: "disabled_single" 0.0;
|
||||
|
|
|
@ -127,21 +127,6 @@ _theme_hook(Evas_Object *obj)
|
|||
edje_object_scale_set(it->base.view, elm_widget_scale_get(it->base.view)
|
||||
*_elm_config->scale);
|
||||
edje_object_mirrored_set(it->base.view, rtl);
|
||||
if (it->label)
|
||||
{
|
||||
edje_object_part_text_set(it->base.view, "elm.text", it->label);
|
||||
edje_object_signal_emit(it->base.view, "elm,state,text,visible", "elm");
|
||||
}
|
||||
else
|
||||
edje_object_signal_emit(it->base.view, "elm,state,text,hidden", "elm");
|
||||
|
||||
if (it->icon)
|
||||
{
|
||||
edje_object_part_swallow(it->base.view, "elm.swallow.icon", it->icon);
|
||||
edje_object_signal_emit(it->base.view, "elm,state,icon,visible", "elm");
|
||||
}
|
||||
else
|
||||
edje_object_signal_emit(it->base.view, "elm,state,icon,hidden", "elm");
|
||||
}
|
||||
|
||||
_update_list(wd);
|
||||
|
@ -361,7 +346,10 @@ _swallow_item_objects(Elm_Segment_Item *it)
|
|||
edje_object_signal_emit(it->base.view, "elm,state,icon,hidden", "elm");
|
||||
|
||||
if (it->label)
|
||||
edje_object_signal_emit(it->base.view, "elm,state,text,visible", "elm");
|
||||
{
|
||||
edje_object_part_text_set(it->base.view, "elm.text", it->label);
|
||||
edje_object_signal_emit(it->base.view, "elm,state,text,visible", "elm");
|
||||
}
|
||||
else
|
||||
edje_object_signal_emit(it->base.view, "elm,state,text,hidden", "elm");
|
||||
edje_object_message_signal_process(it->base.view);
|
||||
|
@ -476,6 +464,8 @@ _item_new(Evas_Object *obj, Evas_Object *icon, const char *label)
|
|||
*_elm_config->scale);
|
||||
evas_object_smart_member_add(it->base.view, obj);
|
||||
elm_widget_sub_object_add(obj, it->base.view);
|
||||
evas_object_clip_set(it->base.view, evas_object_clip_get(obj));
|
||||
|
||||
_elm_theme_object_set(obj, it->base.view, "segment_control", "item",
|
||||
elm_object_style_get(obj));
|
||||
edje_object_mirrored_set(it->base.view,
|
||||
|
|
Loading…
Reference in New Issue