As the request of Prince Kumar Dubey, 
I reviewed and pushed his patch for elm_segment_control.
Thank you Prince. 
------------------------------------
Let's run together for the best moment!
 -Regards, Hermet-
 
-----Original Message-----
From: "Enlightenment SVN"<no-re...@enlightenment.org> 
To: enlightenment-...@lists.sourceforge.net
Cc: 
Sent: 11-07-22(금) 10:48:21
Subject: E SVN: hermet IN trunk/elementary: data/objects data/themes src/libLog:
elementary/segment_control - patched by Prince Kumar Dubey 
(prince.du...@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.
 
 
 
Author: hermet
Date: 2011-07-21 18:48:20 -0700 (Thu, 21 Jul 2011)
New Revision: 61576
Trac: http://trac.enlightenment.org/e/changeset/61576
Modified:
 trunk/elementary/data/objects/test.edc 
trunk/elementary/data/themes/default.edc 
trunk/elementary/src/lib/elm_segment_control.c 
Modified: trunk/elementary/data/objects/test.edc
===================================================================
--- trunk/elementary/data/objects/test.edc 2011-07-21 23:54:04 UTC (rev 61575)
+++ trunk/elementary/data/objects/test.edc 2011-07-22 01:48:20 UTC (rev 61576)
@@ -618,10 +618,10 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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";
+ }
 }
 }
 }
Modified: trunk/elementary/data/themes/default.edc
===================================================================
--- trunk/elementary/data/themes/default.edc 2011-07-21 23:54:04 UTC (rev 61575)
+++ trunk/elementary/data/themes/default.edc 2011-07-22 01:48:20 UTC (rev 61576)
@@ -35893,38 +35893,6 @@
 }
 }
 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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 relative: 1.0 1.0;
 }
 align: 0.0 0.5;
- color: 0 0 0 0;
 }
 }
 part { name: "padding_icon_text";
@@ -36134,6 +36101,7 @@
 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 @@
 }
 fixed: 1 0;
 min: 0 0;
- color: 0 0 0 0;
 }
 description { state: "icononly" 0.0;
 inherit: "default" 0.0;
@@ -36249,8 +36216,14 @@
 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;
Modified: trunk/elementary/src/lib/elm_segment_control.c
===================================================================
--- trunk/elementary/src/lib/elm_segment_control.c 2011-07-21 23:54:04 UTC (rev 
61575)
+++ trunk/elementary/src/lib/elm_segment_control.c 2011-07-22 01:48:20 UTC (rev 
61576)
@@ -127,21 +127,6 @@
 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 @@
 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 @@
 *_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,
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
enlightenment-svn mailing list
enlightenment-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to