[*][button] After disabled_set and icon_set, the text area is made even if the text...
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Wed, 7 Dec 2011 02:33:17 +0000 (11:33 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Wed, 7 Dec 2011 02:33:17 +0000 (11:33 +0900)
    It is why "elm.text" is always set "visible" in the program "diable_text" and "enable_text"
    Maybe it occurs in another button style. But if the text is located beside icon, we cannot show
    the issue because the width of text is 0. In case the text is located below icon, we can show
    the issue because the height of text is not 0.

themes/groups/button.edc

index 7437e70..c80e810 100644 (file)
          }
          program { name: "disable_text";
             script {
+               new st[31];
+               new Float:vl;
                set_int(button_state, BUTTON_STATE_DISABLED);
-               set_state(PART:"elm.text", "visible", 0.0);
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
+                  set_state(PART:"elm.text", "visible", 0.0);
             }
          }
          program { name: "enable";
          }
          program { name: "enable_text";
             script {
+               new st[31];
+               new Float:vl;
                set_int(button_state, BUTTON_STATE_ENABLED);
-               set_state(PART:"elm.text", "visible", 0.0);
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
+                  set_state(PART:"elm.text", "visible", 0.0);
             }
          }
          program { name: "focused";
          }
          program { name: "disable_text";
             script {
+               new st[31];
+               new Float:vl;
                set_int(button_state, BUTTON_STATE_DISABLED);
-               set_state(PART:"elm.text", "visible", 0.0);
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
+                  set_state(PART:"elm.text", "visible", 0.0);
             }
          }
          program { name: "enable";
          }
          program { name: "enable_text";
             script {
+               new st[31];
+               new Float:vl;
                set_int(button_state, BUTTON_STATE_ENABLED);
-               set_state(PART:"elm.text", "visible", 0.0);
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "clicked") || !strcmp(st, "focused"))
+                  set_state(PART:"elm.text", "visible", 0.0);
             }
          }
          program { name: "focused";