add elements in view_user_edit 68/42268/2
authorSoohye Shin <soohye.shin@samsung.com>
Thu, 25 Jun 2015 06:00:46 +0000 (15:00 +0900)
committerSoohye Shin <soohye.shin@samsung.com>
Thu, 25 Jun 2015 06:04:16 +0000 (15:04 +0900)
- photo
- entry input
- switch icon
- delete icon

Change-Id: I3c0095a07b646a3423bc37e3990bc1f3f0518cf8
Signed-off-by: Soohye Shin <soohye.shin@samsung.com>
edje/images/btn_switch_off_nor.png [new file with mode: 0644]
edje/images/btn_switch_on_nor.png [new file with mode: 0644]
edje/view/useredit.edc
images/ic_user_profile_current_01_foc.png [new file with mode: 0644]
images/ic_user_profile_current_01_nor.png [new file with mode: 0644]
include/defs.h
src/utils.c

diff --git a/edje/images/btn_switch_off_nor.png b/edje/images/btn_switch_off_nor.png
new file mode 100644 (file)
index 0000000..10d632c
Binary files /dev/null and b/edje/images/btn_switch_off_nor.png differ
diff --git a/edje/images/btn_switch_on_nor.png b/edje/images/btn_switch_on_nor.png
new file mode 100644 (file)
index 0000000..745dbde
Binary files /dev/null and b/edje/images/btn_switch_on_nor.png differ
index a8d780f..cebea5b 100644 (file)
@@ -39,7 +39,7 @@ group {
                                rel2.to, "title";
                                fixed, 1 1;
                                text {
-                                       font, 46;
+                                       size, 46;
                                        font, "TizenSans";
                                }
                                color, 51 51 51 255;
@@ -127,7 +127,7 @@ group {
                        }
                }
                part {
-                       name, PART_USER_EDIT_BTN_CACEL;
+                       name, PART_USER_EDIT_BTN_CANCEL;
                        type, SWALLOW;
                        scale, 1;
                        description {
@@ -734,11 +734,11 @@ group {
                        }
                }
                part {
-                       name, "bg.delete";
-                       type, RECT;
+                       name, PART_USER_EDIT_CONTENTS_DELETE;
+                       type, SWALLOW;
                        scale, 1;
                        description {
-                               state, "default";
+                               state, "default" 0.0;
                                rel1 {
                                        to, "pad.delete";
                                        relative, 1.0 0.0;
@@ -750,43 +750,244 @@ group {
                                min, 86 64;
                                fixed, 1 1;
                                align, 0.0 0.0;
-                               color, 126 145 172 255;
                        }
+               }
+       }
+}
+
+group {
+       name, GRP_USER_EDIT_PHOTO;
+       parts {
+               part {
+                       name, "bg";
+                       type, RECT;
+                       scale, 1;
                        description {
-                               state, "focus";
+                               state, "default" 0.0;
+                               min, 294 294;
+                               color, 194 194 194 255;
+                       }
+               }
+               part {
+                       name, "bg.photo";
+                       type, RECT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 290 290;
+                               rel1.relative, 0.5 0.5;
+                               rel2.relative, 0.5 0.5;
+                               fixed, 1 1;
+                               color, 255 255 255 255;
+                       }
+                       description {
+                               state, "focus" 0.0;
                                inherit, "default" 0.0;
                                color, 0 119 246 255;
                        }
                }
                part {
-                       name, PART_USER_EDIT_CONTENTS_DELETE;
+                       name, PART_USER_EDIT_PHOTO;
+                       type, SWALLOW;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 284 284;
+                               rel1 {
+                                       to, "bg.photo";
+                                       relative, 0.5 0.5;
+                               }
+                               rel2 {
+                                       to, "bg.photo";
+                                       relative, 0.5 0.5;
+                               }
+                               fixed, 1 1;
+                       }
+               }
+       }
+       programs {
+               program {
+                       name, "sig,focus";
+                       signal, SIG_FOCUS;
+                       source, SRC_PROG;
+                       action, STATE_SET "focus" 0.0;
+                       transition, LINEAR 0.5;
+                       target, "bg.photo";
+               }
+               program {
+                       name, "sig,unfocus";
+                       signal, SIG_UNFOCUS;
+                       source, SRC_PROG;
+                       action, STATE_SET "default" 0.0;
+                       transition, LINEAR 0.5;
+                       target, "bg.photo";
+               }
+       }
+}
+
+group {
+       name, GRP_USER_EDIT_SWITCH;
+       images {
+               image, "btn_switch_on_nor.png" COMP;
+               image, "btn_switch_off_nor.png" COMP;
+       }
+       parts {
+               part {
+                       name, "bg";
+                       type, RECT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 104 54;
+                               visible, 0;
+                       }
+               }
+               part {
+                       name, "icon";
                        type, IMAGE;
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               rel1.to, "bg.delete";
-                               rel2.to, "bg.delete";
+                               image.normal, "btn_switch_on_nor.png";
+                               fixed, 1 1;
+                       }
+                       description {
+                               state, "focus" 0.0;
+                               image.normal, "btn_switch_off_nor.png";
+                               fixed, 1 1;
+                       }
+               }
+       }
+       programs {
+               program {
+                       name, "sig,focus";
+                       signal, SIG_FOCUS;
+                       source, SRC_PROG;
+                       action, STATE_SET "focus" 0.0;
+                       transition, ACCEL 0.2;
+                       target, "icon";
+               }
+               program {
+                       name, "sig,unfocus";
+                       signal, SIG_UNFOCUS;
+                       source, SRC_PROG;
+                       action, STATE_SET "default" 0.0;
+                       transition, ACCEL 0.2;
+                       target, "icon";
+               }
+       }
+}
+
+group {
+       name, GRP_USER_EDIT_ENTRY;
+       parts {
+               part {
+                       name, "bg";
+                       type, RECT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 436 64;
+                               color, 194 194 194 255;
+                       }
+                       description {
+                               state, "focus" 0.0;
+                               inherit, "default" 0.0;
+                               color, 0 119 246 255;
+                       }
+               }
+               part {
+                       name, "bg.entry";
+                       type, RECT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 432 60;
+                               rel1.relative, 0.5 0.5;
+                               rel2.relative, 0.5 0.5;
                                fixed, 1 1;
+                       }
+               }
+               part {
+                       name, PART_USER_EDIT_ENTRY;
+                       type, SWALLOW;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               rel1.to, "bg.entry";
+                               rel2.to, "bg.entry";
+                               fixed, 1 1;
+                       }
+               }
+       }
+       programs {
+               program {
+                       name, "sig,focus";
+                       signal, SIG_FOCUS;
+                       source, SRC_PROG;
+                       action, STATE_SET "focus";
+                       transition, LINEAR 0.5;
+                       target, "bg";
+               }
+               program {
+                       name, "sig,unfocus";
+                       signal, SIG_UNFOCUS;
+                       source, SRC_PROG;
+                       action, STATE_SET "default" 0.0;
+                       transition, LINEAR 0.5;
+                       target, "bg";
+               }
+       }
+}
+
+group {
+       name, GRP_USER_EDIT_DELETE;
+       images {
+               image, "btn_user_del.png" COMP;
+       }
+       parts {
+               part {
+                       name, "bg";
+                       type, RECT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 86 64;
+                               color, 126 145 172 255;
+                       }
+                       description {
+                               state, "focus" 0.0;
+                               inherit, "default" 0.0;
+                               color, 0 119 246 255;
+                       }
+               }
+               part {
+                       name, "icon";
+                       type, IMAGE;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
                                image.normal, "btn_user_del.png";
+                               fixed, 1 1;
                        }
                }
        }
        programs {
                program {
-                       name, "sig,focus,delete";
+                       name, "sig,focus";
                        signal, SIG_FOCUS;
                        source, SRC_PROG;
                        action, STATE_SET "focus" 0.0;
                        transition, LINEAR 0.5;
-                       target, "bg.delete";
+                       target, "bg";
                }
                program {
-                       name, "sig,unfocus,delete";
+                       name, "sig,unfocus";
                        signal, SIG_UNFOCUS;
                        source, SRC_PROG;
-                       action, STATE_SET "unfocus" 0.0;
+                       action, STATE_SET "default" 0.0;
                        transition, LINEAR 0.5;
-                       target, "bg.delete";
+                       target, "bg";
                }
        }
 }
diff --git a/images/ic_user_profile_current_01_foc.png b/images/ic_user_profile_current_01_foc.png
new file mode 100644 (file)
index 0000000..8181db7
Binary files /dev/null and b/images/ic_user_profile_current_01_foc.png differ
diff --git a/images/ic_user_profile_current_01_nor.png b/images/ic_user_profile_current_01_nor.png
new file mode 100644 (file)
index 0000000..975ac7f
Binary files /dev/null and b/images/ic_user_profile_current_01_nor.png differ
index 51f959d..148e6f7 100644 (file)
 #define GRP_USER_ITEM "group.user.item"
 #define GRP_USER_EDIT "group.user.edit"
 #define GRP_USER_EDIT_CONTENTS "group.user.edit.contents"
+#define GRP_USER_EDIT_SWITCH "group.user.edit.switch"
+#define GRP_USER_EDIT_PHOTO "group.user.edit.photo"
+#define GRP_USER_EDIT_ENTRY "group.user.edit.entry"
+#define GRP_USER_EDIT_DELETE "group.user.edit.delete"
 #define GRP_BAR_ITEM "group.bar.item"
 
 #define PART_HOME_MENU_BAR "part.home.menu.bar"
@@ -60,6 +64,8 @@
 #define PART_USER_EDIT_CONTENTS_ACCOUNT "part.user.edit.contents.account"
 #define PART_USER_EDIT_CONTENTS_LOCK "part.user.edit.contents.lock"
 #define PART_USER_EDIT_CONTETNS_DELETE "part.user.edit.contents.delete"
+#define PART_USER_EDIT_PHOTO "part.user.edit.photo"
+#define PART_USER_EDIT_ENTRY "part.user.edit.entry"
 #define PART_BAR_ITEM_BG "part.bar.item.bg"
 #define PART_BAR_ITEM_ICON "part.bar.item.icon"
 #define PART_BAR_ITEM_ICON_FOCUS "part.bar.item.icon.focus"
 #define IMAGE_USER_ADD_FOCUS IMAGEDIR"/btn_user_add_foc.png"
 #define IMAGE_USER_DEFAULT IMAGEDIR"/ic_user_01_nor.png"
 #define IMAGE_USER_DEFAULT_FOCUS IMAGEDIR"/ic_user_01_foc.png"
+#define IMAGE_USER_CURRENT_DEFAULT IMAGEDIR"/ic_user_profile_current_01_nor.png"
+#define IMAGE_USER_CURRENT_DEFAULT_FOCUS IMAGEDIR"/ic_user_profile_current_01_foc.png"
+
 #endif /* __AIR_HOME_DEFS_H__ */
index 1f78641..c309f50 100644 (file)
@@ -191,9 +191,15 @@ Evas_Object *utils_add_button(Evas_Object *base, char *text, const char *part)
 Evas_Object *utils_add_entry(Evas_Object *base, char *text, bool password,
                const char *part)
 {
-       Evas_Object *entry;
+       Evas_Object *ly, *entry;
 
-       entry = elm_entry_add(base);
+       ly = utils_add_layout(base, GRP_USER_EDIT_ENTRY, false, part);
+       if (!ly) {
+               _ERR("failed to add entry layout");
+               return NULL;
+       }
+
+       entry = elm_entry_add(ly);
        if (!entry) {
                _ERR("failed to add entry");
                return NULL;
@@ -209,12 +215,12 @@ Evas_Object *utils_add_entry(Evas_Object *base, char *text, bool password,
        elm_entry_input_panel_language_set(entry,
                        ELM_INPUT_PANEL_LANG_ALPHABET);
        elm_entry_cursor_end_set(entry);
+       elm_entry_scrollable_set(entry, EINA_TRUE);
        elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF,
                        ELM_SCROLLER_POLICY_OFF);
        if (text)
                elm_entry_entry_set(entry, text);
-       if (part)
-               elm_object_part_content_set(base, part, entry);
+       elm_object_part_content_set(ly, PART_USER_EDIT_ENTRY, entry);
 
        evas_object_show(entry);