Added mobile usage edje file 66/197266/2 sdk
authorLukasz Pik <lu.pik@samsung.com>
Thu, 10 Jan 2019 10:25:02 +0000 (11:25 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Thu, 17 Jan 2019 14:43:08 +0000 (14:43 +0000)
Change-Id: I8eb5020354b0916ec3c4de1aaac4d7b05e598ade
Signed-off-by: Lukasz Pik <lu.pik@samsung.com>
setting-main/res/edc_resource/genlist_item_mobile_data_usage.edc [deleted file]
smartmanager-data/res/edje/genlist_item_mobile_data_usage.edc [new file with mode: 0644]

diff --git a/setting-main/res/edc_resource/genlist_item_mobile_data_usage.edc b/setting-main/res/edc_resource/genlist_item_mobile_data_usage.edc
deleted file mode 100644 (file)
index 30b32bf..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-#define MSG_ID_TEXTS 1 /* String set of: timespan, quantity, warn, limit; If warn is NULL; limit part will take its position */
-#define MSG_ID_BAR_LIMITS 2 /* Float set of: warn, limit; If limit or warn < 0.0 it means they are not set */
-#define MSG_ID_BAR_VALUES 3
-
-styles {
-       style {
-               name: "small_text_style";
-               base: "font=default font_size=20 color=#ffffffff align=left wrap=mixed";
-       }
-       style {
-               name: "value_style";
-               base: "font=default font_size=32 align=left color=#000000ff style=shadow,bottom shadow_color=#000000ff wrap=mixed";
-       }
-}
-
-
-collections
-{
-       base_scale: 2.4;
-
-       group
-       {
-               name: "genlist_item_mobile_data_usage";
-
-               parts
-               {
-                       part
-                       {
-                               type: RECT;
-                               scale: 1;
-                               description
-                               {
-                                       state: "default" 0.0;
-                                       color: 255 255 255 255;
-                                       visible: 1;
-                                       min: 0 260;
-                                       rel1.relative: 0.0 0.0;
-                                       rel2.relative: 1.0 1.0;
-                               }
-                       }
-
-                       part
-                       {
-                               name: "timespan_txt";
-                               type: TEXTBLOCK;
-                               description
-                               {
-                                       state: "default" 0.0;
-                                       color: 173 173 173 255;
-                                       visible: 1;
-                                       rel1.relative: 0.0375 0.079310345;
-                                       rel2.relative: 0.9625 0.182758621;
-                                       text
-                                       {
-                                               style: "small_text_style";
-                                               text: "";
-                                       }
-                               }
-                       }
-
-                       part
-                       {
-                               name: "quantity_txt";
-                               type: TEXTBLOCK;
-                               description
-                               {
-                                       state: "default" 0.0;
-                                       color: 255 255 255 255;
-                                       visible: 1;
-                                       rel1.relative: 0.0375 0.24137931;
-                                       rel2.relative: 0.9625 0.389310345;
-                                       text
-                                       {
-                                               style: "value_style";
-                                               text: "";
-                                       }
-                               }
-                       }
-
-                       part
-                       {
-                               name: "progress_bar_bg";
-                               type: RECT;
-
-                               part
-                               {
-                                       name: "progress_bar";
-                                       type: RECT;
-                                       scale: 1;
-                                       description
-                                       {
-                                               state: "default" 0.0;
-                                               color: 0 0 255 255;
-                                               visible: 1;
-                                               rel1.relative: 0.0 0.0;
-                                               rel2.relative: 1.0 1.0;
-                                       }
-                                       description
-                                       {
-                                               state: "warning" 0.0;
-                                               inherit: "default" 0.0;
-                                               color: 255 255 0 255;
-                                       }
-                                       description
-                                       {
-                                               state: "limit" 0.0;
-                                               inherit: "default" 0.0;
-                                               color: 255 0 0 255;
-                                       }
-                               }
-                               part
-                               {
-                                       name: "warning_indicator";
-                                       type: RECT;
-                                       scale: 1;
-                                       description
-                                       {
-                                               state: "default" 0.0;
-                                               color: 255 204 50 255;
-                                               visible: 1;
-                                               min: 12 1;
-                                               rel1.relative: 1.0 0.0;
-                                               rel2.relative: 1.0 1.0;
-                                       }
-                                       description
-                                       {
-                                               state: "warning" 0.0;
-                                               inherit: "default" 0.0;
-                                               color: 255 255 0 255;
-                                       }
-                                       description
-                                       {
-                                               state: "limit" 0.0;
-                                               inherit: "default" 0.0;
-                                               color: 255 0 0 255;
-                                       }
-                               }
-                               part
-                               {
-                                       name: "limit_indicator";
-                                       type: RECT;
-                                       scale: 1;
-                                       description
-                                       {
-                                               state: "default" 0.0;
-                                               color: 194 8 8 255;
-                                               visible: 1;
-                                               min: 12 1;
-                                               rel1.relative: 0.5 0.0;
-                                               rel2.relative: 0.5 1.0;
-                                       }
-                               }
-
-                               description {
-                                       state: "default" 0.0;
-                                       color: 128 128 128 255;
-                                       visible: 1;
-                                       rel1.relative: 0.029166667 0.475517241;
-                                       rel2.relative: 0.970833333 0.544482759;
-                               }
-                               description {
-                                       state: "warning" 0.0;
-                                       inherit: "default" 0.0;
-                                       color: 128 128 64 255;
-                               }
-                               description {
-                                       state: "limit" 0.0;
-                                       inherit: "default" 0.0;
-                                       color: 128 64 64 255;
-                               }
-
-                       }
-
-                       part
-                       {
-                               name: "warning_txt";
-                               type: TEXTBLOCK;
-                               description
-                               {
-                                       state: "default" 0.0;
-                                       color: 255 204 50 255;
-                                       visible: 1;
-                                       rel1.relative: 0.0375 0.675517241;
-                                       rel2.relative: 0.9625 0.778965517;
-                                       text
-                                       {
-                                               style: "small_text_style";
-                                               text: "";
-                                       }
-                               }
-                       }
-
-                       part
-                       {
-                               name: "limit_txt";
-                               type: TEXTBLOCK;
-                               description
-                               {
-                                       state: "default" 0.0;
-                                       color: 194 8 8 255;
-                                       visible: 1;
-                                       rel1.relative: 0.0375 0.806551724;
-                                       rel2.relative: 0.9625 0.91;
-                                       text
-                                       {
-                                               style: "small_text_style";
-                                               text: "";
-                                       }
-                               }
-                       }
-               }
-
-               script
-               {
-                       public warn_g;
-                       public limit_g;
-
-                       public message(Msg_Type:type, id, ...)
-                       {
-                               if(type == MSG_FLOAT_SET && id == MSG_ID_BAR_LIMITS) {
-                                       new Float:warn = getfarg(2);
-                                       new Float:limit = getfarg(3);
-
-                                       custom_state(PART:"warning_indicator", "default", 0.0);
-                                       custom_state(PART:"limit_indicator", "default", 0.0);
-
-                                       if(warn >= 0.0) {
-                                               set_state_val(PART:"warning_indicator", STATE_REL1, warn, 0.0);
-                                               set_state_val(PART:"warning_indicator", STATE_REL2, warn, 1.0);
-                                               set_state_val(PART:"warning_indicator", STATE_VISIBLE, 1);
-                                       } else {
-                                               set_state_val(PART:"warning_indicator", STATE_VISIBLE, 0);
-                                       }
-                                       set_state(PART:"warning_indicator", "custom", 0.0);
-
-                                       if(limit >= 0.0) {
-                                               set_state_val(PART:"limit_indicator", STATE_REL1, limit, 0.0);
-                                               set_state_val(PART:"limit_indicator", STATE_REL2, limit, 1.0);
-                                               set_state_val(PART:"limit_indicator", STATE_VISIBLE, 1);
-                                       } else {
-                                               set_state_val(PART:"limit_indicator", STATE_VISIBLE, 0);
-                                       }
-                                       set_state(PART:"limit_indicator", "custom", 0.0);
-
-                                       set_float (warn_g, warn);
-                                       set_float (limit_g, limit);
-                               } else if (type == MSG_FLOAT && id == MSG_ID_BAR_VALUES) {
-                                       new Float: warn = get_float(warn_g);
-                                       new Float: limit = get_float(limit_g);
-
-                                       new Float: value = getfarg(2);
-                                       new state_name[32];
-
-                                       if (value >= limit && get_float(limit_g) > 0)
-                                               strncpy(state_name, "limit", 32);
-                                       else if (value >= warn && get_float(warn_g) > 0)
-                                               strncpy(state_name, "warning", 32);
-                                       else
-                                               strncpy(state_name, "default", 32);
-
-                                       custom_state(PART:"progress_bar", state_name, 0.0);
-                                       if (value > 1.0)
-                                               value = 1.0;
-                                       set_state_val(PART:"progress_bar", STATE_REL2, value, 1.0);
-                                       set_state(PART:"progress_bar", "custom", 0.0);
-                               }
-                       }
-               }
-       }
-}
diff --git a/smartmanager-data/res/edje/genlist_item_mobile_data_usage.edc b/smartmanager-data/res/edje/genlist_item_mobile_data_usage.edc
new file mode 100644 (file)
index 0000000..30b32bf
--- /dev/null
@@ -0,0 +1,270 @@
+#define MSG_ID_TEXTS 1 /* String set of: timespan, quantity, warn, limit; If warn is NULL; limit part will take its position */
+#define MSG_ID_BAR_LIMITS 2 /* Float set of: warn, limit; If limit or warn < 0.0 it means they are not set */
+#define MSG_ID_BAR_VALUES 3
+
+styles {
+       style {
+               name: "small_text_style";
+               base: "font=default font_size=20 color=#ffffffff align=left wrap=mixed";
+       }
+       style {
+               name: "value_style";
+               base: "font=default font_size=32 align=left color=#000000ff style=shadow,bottom shadow_color=#000000ff wrap=mixed";
+       }
+}
+
+
+collections
+{
+       base_scale: 2.4;
+
+       group
+       {
+               name: "genlist_item_mobile_data_usage";
+
+               parts
+               {
+                       part
+                       {
+                               type: RECT;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       color: 255 255 255 255;
+                                       visible: 1;
+                                       min: 0 260;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+
+                       part
+                       {
+                               name: "timespan_txt";
+                               type: TEXTBLOCK;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       color: 173 173 173 255;
+                                       visible: 1;
+                                       rel1.relative: 0.0375 0.079310345;
+                                       rel2.relative: 0.9625 0.182758621;
+                                       text
+                                       {
+                                               style: "small_text_style";
+                                               text: "";
+                                       }
+                               }
+                       }
+
+                       part
+                       {
+                               name: "quantity_txt";
+                               type: TEXTBLOCK;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       color: 255 255 255 255;
+                                       visible: 1;
+                                       rel1.relative: 0.0375 0.24137931;
+                                       rel2.relative: 0.9625 0.389310345;
+                                       text
+                                       {
+                                               style: "value_style";
+                                               text: "";
+                                       }
+                               }
+                       }
+
+                       part
+                       {
+                               name: "progress_bar_bg";
+                               type: RECT;
+
+                               part
+                               {
+                                       name: "progress_bar";
+                                       type: RECT;
+                                       scale: 1;
+                                       description
+                                       {
+                                               state: "default" 0.0;
+                                               color: 0 0 255 255;
+                                               visible: 1;
+                                               rel1.relative: 0.0 0.0;
+                                               rel2.relative: 1.0 1.0;
+                                       }
+                                       description
+                                       {
+                                               state: "warning" 0.0;
+                                               inherit: "default" 0.0;
+                                               color: 255 255 0 255;
+                                       }
+                                       description
+                                       {
+                                               state: "limit" 0.0;
+                                               inherit: "default" 0.0;
+                                               color: 255 0 0 255;
+                                       }
+                               }
+                               part
+                               {
+                                       name: "warning_indicator";
+                                       type: RECT;
+                                       scale: 1;
+                                       description
+                                       {
+                                               state: "default" 0.0;
+                                               color: 255 204 50 255;
+                                               visible: 1;
+                                               min: 12 1;
+                                               rel1.relative: 1.0 0.0;
+                                               rel2.relative: 1.0 1.0;
+                                       }
+                                       description
+                                       {
+                                               state: "warning" 0.0;
+                                               inherit: "default" 0.0;
+                                               color: 255 255 0 255;
+                                       }
+                                       description
+                                       {
+                                               state: "limit" 0.0;
+                                               inherit: "default" 0.0;
+                                               color: 255 0 0 255;
+                                       }
+                               }
+                               part
+                               {
+                                       name: "limit_indicator";
+                                       type: RECT;
+                                       scale: 1;
+                                       description
+                                       {
+                                               state: "default" 0.0;
+                                               color: 194 8 8 255;
+                                               visible: 1;
+                                               min: 12 1;
+                                               rel1.relative: 0.5 0.0;
+                                               rel2.relative: 0.5 1.0;
+                                       }
+                               }
+
+                               description {
+                                       state: "default" 0.0;
+                                       color: 128 128 128 255;
+                                       visible: 1;
+                                       rel1.relative: 0.029166667 0.475517241;
+                                       rel2.relative: 0.970833333 0.544482759;
+                               }
+                               description {
+                                       state: "warning" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 128 128 64 255;
+                               }
+                               description {
+                                       state: "limit" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 128 64 64 255;
+                               }
+
+                       }
+
+                       part
+                       {
+                               name: "warning_txt";
+                               type: TEXTBLOCK;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       color: 255 204 50 255;
+                                       visible: 1;
+                                       rel1.relative: 0.0375 0.675517241;
+                                       rel2.relative: 0.9625 0.778965517;
+                                       text
+                                       {
+                                               style: "small_text_style";
+                                               text: "";
+                                       }
+                               }
+                       }
+
+                       part
+                       {
+                               name: "limit_txt";
+                               type: TEXTBLOCK;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       color: 194 8 8 255;
+                                       visible: 1;
+                                       rel1.relative: 0.0375 0.806551724;
+                                       rel2.relative: 0.9625 0.91;
+                                       text
+                                       {
+                                               style: "small_text_style";
+                                               text: "";
+                                       }
+                               }
+                       }
+               }
+
+               script
+               {
+                       public warn_g;
+                       public limit_g;
+
+                       public message(Msg_Type:type, id, ...)
+                       {
+                               if(type == MSG_FLOAT_SET && id == MSG_ID_BAR_LIMITS) {
+                                       new Float:warn = getfarg(2);
+                                       new Float:limit = getfarg(3);
+
+                                       custom_state(PART:"warning_indicator", "default", 0.0);
+                                       custom_state(PART:"limit_indicator", "default", 0.0);
+
+                                       if(warn >= 0.0) {
+                                               set_state_val(PART:"warning_indicator", STATE_REL1, warn, 0.0);
+                                               set_state_val(PART:"warning_indicator", STATE_REL2, warn, 1.0);
+                                               set_state_val(PART:"warning_indicator", STATE_VISIBLE, 1);
+                                       } else {
+                                               set_state_val(PART:"warning_indicator", STATE_VISIBLE, 0);
+                                       }
+                                       set_state(PART:"warning_indicator", "custom", 0.0);
+
+                                       if(limit >= 0.0) {
+                                               set_state_val(PART:"limit_indicator", STATE_REL1, limit, 0.0);
+                                               set_state_val(PART:"limit_indicator", STATE_REL2, limit, 1.0);
+                                               set_state_val(PART:"limit_indicator", STATE_VISIBLE, 1);
+                                       } else {
+                                               set_state_val(PART:"limit_indicator", STATE_VISIBLE, 0);
+                                       }
+                                       set_state(PART:"limit_indicator", "custom", 0.0);
+
+                                       set_float (warn_g, warn);
+                                       set_float (limit_g, limit);
+                               } else if (type == MSG_FLOAT && id == MSG_ID_BAR_VALUES) {
+                                       new Float: warn = get_float(warn_g);
+                                       new Float: limit = get_float(limit_g);
+
+                                       new Float: value = getfarg(2);
+                                       new state_name[32];
+
+                                       if (value >= limit && get_float(limit_g) > 0)
+                                               strncpy(state_name, "limit", 32);
+                                       else if (value >= warn && get_float(warn_g) > 0)
+                                               strncpy(state_name, "warning", 32);
+                                       else
+                                               strncpy(state_name, "default", 32);
+
+                                       custom_state(PART:"progress_bar", state_name, 0.0);
+                                       if (value > 1.0)
+                                               value = 1.0;
+                                       set_state_val(PART:"progress_bar", STATE_REL2, value, 1.0);
+                                       set_state(PART:"progress_bar", "custom", 0.0);
+                               }
+                       }
+               }
+       }
+}