detail: add focused icon for current play status 80/49180/2
authorJehun Lim <jehun.lim@samsung.com>
Thu, 8 Oct 2015 04:12:10 +0000 (13:12 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Thu, 8 Oct 2015 04:15:52 +0000 (13:15 +0900)
Change-Id: I6c5c558c54036d1c9061d3ffcf699c1bf6d110c6
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
13 files changed:
include/view/detail.h
res/edc/images/btn_view_contr_slideshow_foc.png
res/edc/images/btn_view_contr_slideshow_nor.png
res/edc/images/ic_mini_player_pause.png
res/edc/images/ic_zoom_indicator_down_foc.png
res/edc/images/ic_zoom_indicator_down_nor.png
res/edc/images/ic_zoom_indicator_left_foc.png
res/edc/images/ic_zoom_indicator_left_nor.png
res/edc/images/ic_zoom_indicator_right_foc.png
res/edc/images/ic_zoom_indicator_right_nor.png
res/edc/images/ic_zoom_indicator_up_foc.png
res/edc/images/ic_zoom_indicator_up_nor.png
res/edc/widgets/button.edc

index 89d0853..5ce4850 100644 (file)
@@ -29,6 +29,7 @@
 #define PART_DETAIL_CONTENT_INFO "part.detail_content_info"
 #define PART_DETAIL_THUMBNAIL_AREA "part.detail_thumbnail_area"
 #define PART_DETAIL_PLAY_INFO "part.detail_play_info"
+#define PART_PLAY_INFO_STATUS "part.play_info_status"
 
 /* signal */
 #define SIG_SHOW_THUMBNAIL "show,thumbnail"
 #define SIG_SET_STATUS_STOP "set,stop"
 
 /* images */
-#define IMAGE_MINI_PLAYER_PLAY "ic_mini_player_play_nor.png"
-#define IMAGE_MINI_PLAYER_PAUSE "ic_mini_player_pause.png"
+#define IMAGE_MINI_PLAYER_PLAY_NOR "ic_mini_player_play_nor.png"
+#define IMAGE_MINI_PLAYER_PLAY_FOC "ic_mini_player_play_foc.png"
+#define IMAGE_MINI_PLAYER_PAUSE_NOR "ic_mini_player_pause.png"
+#define IMAGE_MINI_PLAYER_PAUSE_FOC "ic_mini_player_pause_foc.png"
 
 /* style */
 #define STYLE_BTN_PLAY_INFO "detail_btn_play_info"
index 413aefb..51f43a0 100644 (file)
Binary files a/res/edc/images/btn_view_contr_slideshow_foc.png and b/res/edc/images/btn_view_contr_slideshow_foc.png differ
index e9ec7d2..4f47d89 100644 (file)
Binary files a/res/edc/images/btn_view_contr_slideshow_nor.png and b/res/edc/images/btn_view_contr_slideshow_nor.png differ
index 327c5ac..8dd0115 100644 (file)
Binary files a/res/edc/images/ic_mini_player_pause.png and b/res/edc/images/ic_mini_player_pause.png differ
index 797738c..51ade9b 100644 (file)
Binary files a/res/edc/images/ic_zoom_indicator_down_foc.png and b/res/edc/images/ic_zoom_indicator_down_foc.png differ
index 1ec7c1a..a97c0dc 100644 (file)
Binary files a/res/edc/images/ic_zoom_indicator_down_nor.png and b/res/edc/images/ic_zoom_indicator_down_nor.png differ
index d224bb1..dd52901 100644 (file)
Binary files a/res/edc/images/ic_zoom_indicator_left_foc.png and b/res/edc/images/ic_zoom_indicator_left_foc.png differ
index bdc35fe..7287442 100644 (file)
Binary files a/res/edc/images/ic_zoom_indicator_left_nor.png and b/res/edc/images/ic_zoom_indicator_left_nor.png differ
index 2509aa1..6d2894c 100644 (file)
Binary files a/res/edc/images/ic_zoom_indicator_right_foc.png and b/res/edc/images/ic_zoom_indicator_right_foc.png differ
index 0825b13..f775101 100644 (file)
Binary files a/res/edc/images/ic_zoom_indicator_right_nor.png and b/res/edc/images/ic_zoom_indicator_right_nor.png differ
index ee95dee..c0a67a5 100644 (file)
Binary files a/res/edc/images/ic_zoom_indicator_up_foc.png and b/res/edc/images/ic_zoom_indicator_up_foc.png differ
index ecd4be4..d10d9b2 100644 (file)
Binary files a/res/edc/images/ic_zoom_indicator_up_nor.png and b/res/edc/images/ic_zoom_indicator_up_nor.png differ
index d7b2ceb..9c9ac6f 100644 (file)
@@ -25,6 +25,7 @@
 
 #define STATE_PLAY 0
 #define STATE_PAUSE 1
+#define STATE_STOP 2
 
 #define STATE_EN 0
 #define STATE_DIS 1
@@ -4505,8 +4506,13 @@ group {
        name: "elm/button/base/detail_btn_play_info";
        data.item: "focus_highlight" "on";
        images {
-               image: IMAGE_MINI_PLAYER_PLAY COMP;
-               image: IMAGE_MINI_PLAYER_PAUSE COMP;
+               image: IMAGE_MINI_PLAYER_PLAY_NOR COMP;
+               image: IMAGE_MINI_PLAYER_PLAY_FOC COMP;
+               image: IMAGE_MINI_PLAYER_PAUSE_NOR COMP;
+               image: IMAGE_MINI_PLAYER_PAUSE_FOC COMP;
+       }
+       script {
+               public cur_state;
        }
        parts {
                part {
@@ -4547,7 +4553,7 @@ group {
                                        relative: 1.0 1.0;
                                }
                                rel2.to: "padding_status";
-                               image.normal: IMAGE_MINI_PLAYER_PLAY;
+                               image.normal: IMAGE_MINI_PLAYER_PLAY_NOR;
                                min: 0 54;
                                align: 0.0 0.0;
                                fixed: 1 1;
@@ -4558,9 +4564,19 @@ group {
                                min: 54 54;
                        }
                        description {
+                               state: "focused_play" 0.0;
+                               inherit: "play" 0.0;
+                               image.normal: IMAGE_MINI_PLAYER_PLAY_FOC;
+                       }
+                       description {
                                state: "pause" 0.0;
                                inherit: "play" 0.0;
-                               image.normal: IMAGE_MINI_PLAYER_PAUSE;
+                               image.normal: IMAGE_MINI_PLAYER_PAUSE_NOR;
+                       }
+                       description {
+                               state: "focused_pause" 0.0;
+                               inherit: "play";
+                               image.normal: IMAGE_MINI_PLAYER_PAUSE_FOC;
                        }
                }
                part {
@@ -4632,24 +4648,66 @@ group {
        }
        programs {
                program {
+                       name: "load";
+                       signal: "load";
+                       source: "";
+                       script {
+                               set_int(cur_state, STATE_STOP);
+                       }
+               }
+               program {
                        name: "button_clicked";
                        signal: "mouse,clicked,1";
                        source: "event";
                        action: SIGNAL_EMIT "elm.action,click" "";
                }
                program {
-                       name: "focused";
-                       signal: "elm,action,focus";
-                       source: "elm";
+                       name: "go_active";
+                       signal: SIG_ELM_FOCUS;
+                       source: SIG_SOURCE_ELM;
+                       script {
+                               new state;
+                               state = get_int(cur_state);
+
+                               if (state == STATE_PLAY) {
+                                       set_state(PART:PART_PLAY_INFO_STATUS,
+                                                       "focused_play", 0.0);
+                               } else if (state == STATE_PAUSE) {
+                                       set_state(PART:PART_PLAY_INFO_STATUS,
+                                                       "focused_pause", 0.0);
+                               }
+
+                               run_program(PROGRAM:"focus,anim");
+                       }
+               }
+               program {
+                       name: "go_passive";
+                       signal: SIG_ELM_UNFOCUS;
+                       source: SIG_SOURCE_ELM;
+                       script {
+                               new state;
+                               state = get_int(cur_state);
+
+                               if (state == STATE_PLAY) {
+                                       set_state(PART:PART_PLAY_INFO_STATUS,
+                                                       "play", 0.0);
+                               } else if (state == STATE_PAUSE) {
+                                       set_state(PART:PART_PLAY_INFO_STATUS,
+                                                       "pause", 0.0);
+                               }
+
+                               run_program(PROGRAM:"unfocus,anim");
+                       }
+               }
+               program {
+                       name: "focus,anim";
                        action: STATE_SET "focused" 0.0;
                        target: "bg";
                        target: "elm.text";
                        transition: TRANSITION_FOCUS;
                }
                program {
-                       name: "unfocused";
-                       signal: "elm,action,unfocus";
-                       source: "elm";
+                       name: "unfocus,anim";
                        action: STATE_SET "default" 0.0;
                        target: "bg";
                        target: "elm.text";
@@ -4673,25 +4731,31 @@ group {
                        name: SIG_SET_STATUS_PLAY;
                        signal: SIG_SET_STATUS_PLAY;
                        source: SIG_SOURCE_SRC;
-                       action: STATE_SET "play" 0.0;
-                       target: PART_PLAY_INFO_STATUS;
-                       target: "padding_text";
+                       script {
+                               set_int(cur_state, STATE_PLAY);
+                               set_state(PART:PART_PLAY_INFO_STATUS, "play", 0.0);
+                               set_state(PART:"padding_text", "play", 0.0);
+                       }
                }
                program {
                        name: SIG_SET_STATUS_PAUSE;
                        signal: SIG_SET_STATUS_PAUSE;
                        source: SIG_SOURCE_SRC;
-                       action: STATE_SET "pause" 0.0;
-                       target: PART_PLAY_INFO_STATUS;
-                       target: "padding_text";
+                       script {
+                               set_int(cur_state, STATE_PAUSE);
+                               set_state(PART:PART_PLAY_INFO_STATUS, "pause", 0.0);
+                               set_state(PART:"padding_text", "pause", 0.0);
+                       }
                }
                program {
                        name: SIG_SET_STATUS_STOP;
                        signal: SIG_SET_STATUS_STOP;
                        source: SIG_SOURCE_SRC;
-                       action: STATE_SET "default" 0.0;
-                       target: PART_PLAY_INFO_STATUS;
-                       target: "padding_text";
+                       script {
+                               set_int(cur_state, STATE_STOP);
+                               set_state(PART:PART_PLAY_INFO_STATUS, "default", 0.0);
+                               set_state(PART:"padding_text", "default", 0.0);
+                       }
                }
        }
 }