X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=themes%2Fwidgets%2Fradio.edc;h=01a9b7a9a766257cf6a2086924b626c8bd9314d8;hb=0e39e25faef0f48d69b46233a8c2539423499cab;hp=7fab1b54b3602c7ac0be0d2aa0e70a74f68d068b;hpb=2582f11f574aff9df814e329c0fcb0cbd0948022;p=platform%2Fcore%2Fuifw%2Fefl-theme-tizen.git diff --git a/themes/widgets/radio.edc b/themes/widgets/radio.edc index 7fab1b5..01a9b7a 100644 --- a/themes/widgets/radio.edc +++ b/themes/widgets/radio.edc @@ -15,12 +15,8 @@ * limitations under the License. */ - - -#define RADIO_STATE_DEFAULT 0 -#define RADIO_STATE_VISIBLE 1 -#define RADIO_STATE_DISABLED_VISIBLE 2 -#define RADIO_STATE_DISABLED 3 +#define RADIO_STATE_DEFAULT 0 // radio is off +#define RADIO_STATE_VISIBLE 1 // radio is on styles { style { name: "radio_label_textblock_style"; @@ -38,10 +34,15 @@ #define RADIO_STYLE_DEFAULT(style_name, min_width, min_height) \ group { name: "elm/radio/base/"style_name; \ images { \ - image: "00_button_radio_dim.png" COMP; \ - image: "00_button_radio_Activated.png" COMP; \ + image: "00_button_radio_activated_dim.png" COMP; \ + image: "00_button_radio_activated.png" COMP; \ image: "00_button_radio_bg.png" COMP; \ image: "00_button_radio_dim_bg.png" COMP; \ + image: "00_button_radio_press_bg.png" COMP; \ + image: "00_button_radio_press.png" COMP; \ + } \ + script { \ + public radio_state = RADIO_STATE_DEFAULT; \ } \ parts { \ part { name: "back_bg"; \ @@ -70,6 +71,10 @@ inherit: "default" 0.0; \ image.normal: "00_button_radio_dim_bg.png"; \ } \ + description { state: "pressed" 0.0; \ + inherit: "default" 0.0; \ + image.normal: "00_button_radio_press_bg.png"; \ + } \ } \ part { name: "radio"; \ clip_to: "opacity_clip"; \ @@ -79,7 +84,7 @@ rel1.to: "bg"; \ rel2.to: "bg"; \ max: 0 0; \ - image.normal: "00_button_radio_Activated.png"; \ + image.normal: "00_button_radio_activated.png"; \ visible: 0; \ } \ description { state: "visible" 0.0; \ @@ -92,7 +97,11 @@ } \ description { state: "disabled_visible" 0.0; \ inherit: "visible" 0.0; \ - image.normal: "00_button_radio_dim.png"; \ + image.normal: "00_button_radio_activated_dim.png"; \ + } \ + description { state: "pressed" 0.0; \ + inherit: "visible" 0.0; \ + image.normal: "00_button_radio_press.png"; \ } \ } \ part { name: "opacity_clip"; \ @@ -229,19 +238,41 @@ program { name: "bg_normal"; \ signal: "mouse,up,1"; \ source: "over2"; \ - action: STATE_SET "default" 0.0; \ - target: "bg"; \ + script { \ + if (get_int(radio_state) == RADIO_STATE_VISIBLE) \ + set_state(PART:"radio", "visible", 0.0); \ + else \ + set_state(PART:"radio", "default", 0.0); \ + set_state(PART:"bg", "default", 0.0); \ + } \ } \ program { name: "pressed"; \ signal: "mouse,down,1"; \ source: "over2"; \ - action: STATE_SET "pressed" 0.0; \ - target: "bg"; \ + script { \ + if (get_int(radio_state) == RADIO_STATE_VISIBLE) \ + set_state(PART:"radio", "pressed", 0.0); \ + else \ + set_state(PART:"radio", "default", 0.0); \ + set_state(PART:"bg", "pressed", 0.0); \ + } \ + } \ + program { name: "mouse,out"; \ + signal: "mouse,out"; \ + source: "over2"; \ + script { \ + if (get_int(radio_state) == RADIO_STATE_VISIBLE) \ + set_state(PART:"radio", "visible", 0.0); \ + else \ + set_state(PART:"radio", "default", 0.0); \ + set_state(PART:"bg", "default", 0.0); \ + } \ } \ program { name: "radio_on"; \ signal: "elm,state,radio,on"; \ source: "elm"; \ script { \ + set_int(radio_state, RADIO_STATE_VISIBLE); \ run_program(PROGRAM:"radio_show_effect"); \ run_program(PROGRAM:"radio_draw_effect"); \ } \ @@ -250,6 +281,7 @@ signal: "elm,state,radio,off"; \ source: "elm"; \ script { \ + set_int(radio_state, RADIO_STATE_DEFAULT); \ set_state(PART:"opacity_clip", "default", 0.0); \ set_state(PART:"radio", "default", 0.0); \ } \ @@ -367,5 +399,3 @@ RADIO_STYLE_DEFAULT("default/extended", RADIO_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI #undef RADIO_STATE_DEFAULT #undef RADIO_STATE_VISIBLE -#undef RADIO_STATE_DISABLED_VISIBLE -#undef RADIO_STATE_DISABLED