From 5e810939b0990d634b3cbf3ad2cf7262a3097b94 Mon Sep 17 00:00:00 2001 From: Tae-Hwan Kim Date: Fri, 26 Apr 2013 23:43:45 +0900 Subject: [PATCH] [Genlist] Add genlist/default check style for genlist depth-in style Change-Id: Id71171db2bbeffb0aeb383ca1794a19b23c9b2cb Conflicts: themes/widgets/check.edc --- themes/widgets/check.edc | 41 +++++++++++++++++++++++++++++ themes/widgets/genlist/genlist_decorate.edc | 1 - themes/widgets/genlist/genlist_macro.edc | 25 ------------------ themes/widgets/genlist/genlist_normal.edc | 13 --------- 4 files changed, 41 insertions(+), 39 deletions(-) diff --git a/themes/widgets/check.edc b/themes/widgets/check.edc index 5c2dd13..a739628 100644 --- a/themes/widgets/check.edc +++ b/themes/widgets/check.edc @@ -456,6 +456,10 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI description { state: "visible" 0.0; \ inherit: "default" 0.0; \ } \ + description { state: "pressed" 0.0; \ + inherit: "default" 0.0; \ + image.normal: "00_check_press_bg.png"; \ + } \ description { state: "disabled" 0.0; \ inherit: "default" 0.0; \ image.normal: "00_check_dim_bg.png"; \ @@ -483,6 +487,12 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI image.normal: "00_check_Activated_dim.png"; \ color: 255 255 255 255; \ } \ + description { state: "pressed" 0.0; \ + inherit: "default" 0.0; \ + visible: 1; \ + image.normal: "00_check_press.png"; \ + color: 255 255 255 255; \ + } \ } \ part { name: "sequence_clip"; \ type: RECT; \ @@ -606,6 +616,36 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI set_int(check_visible, CHECK_HIDE); \ } \ } \ + program { name: "bg_normal"; \ + signal: "elm,state,mouse,up"; \ + source: "elm"; \ + action: STATE_SET "default" 0.0; \ + target: "bg"; \ + target: "check"; \ + } \ + program { name: "pressed"; \ + signal: "elm,state,mouse,down"; \ + source: "elm"; \ + action: STATE_SET "pressed" 0.0; \ + target: "bg"; \ + target: "check"; \ + } \ + program { name: "mouse,out"; \ + signal: "mouse,out"; \ + source: "events2"; \ + script { \ + if (get_int(check_state) == CHECK_STATE_VISIBLE) \ + { \ + set_state(PART:"check", "visible", 0.0); \ + set_state(PART:"sequence_clip", "visible", 0.0); \ + } \ + else \ + { \ + set_state(PART:"check", "default", 0.0); \ + set_state(PART:"sequence_clip", "default", 0.0); \ + } \ + } \ + } \ program { name: "check_on"; \ signal: "elm,state,check,on"; \ source: "elm"; \ @@ -740,6 +780,7 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI } //////////////////////////////////////////////////////////////////////////////// CHECK_STYLE_DEFAULT_GENLIST_EDITMODE("default/genlist_editmode", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC) +CHECK_STYLE_DEFAULT_GENLIST_EDITMODE("default/genlist", CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, CHECK_STYLE_DEFAULT_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC) //////////////////////////////////////////////////////////////////////////////// #define CHECK_STYLE_FOR_GENLIST(style_name, min_width, min_height) \ diff --git a/themes/widgets/genlist/genlist_decorate.edc b/themes/widgets/genlist/genlist_decorate.edc index 60c83b0..a329b57 100644 --- a/themes/widgets/genlist/genlist_decorate.edc +++ b/themes/widgets/genlist/genlist_decorate.edc @@ -169,7 +169,6 @@ // not be repeated!!!!!!!! GENLIST_PROGRAM_SOUND("sound_left") GENLIST_PROGRAM_SOUND("sound_right") - GENLIST_PROGRAM_CHECK("elm.edit.icon.1") GENLIST_PROGRAM_REORDER( target: "bg_clip"; target: "bg_reorder_clip"; diff --git a/themes/widgets/genlist/genlist_macro.edc b/themes/widgets/genlist/genlist_macro.edc index 494ed59..8399fea 100644 --- a/themes/widgets/genlist/genlist_macro.edc +++ b/themes/widgets/genlist/genlist_macro.edc @@ -1699,31 +1699,6 @@ target: "focus_part"; \ } -// If check is swallowed, genlist selected/unselected should be synched with check. -#define GENLIST_PROGRAM_CHECK(CHECK) \ - program { name: "selected"CHECK; \ - signal: "mouse,down,1"; \ - source: CHECK; \ - script { \ - new st[31]; \ - new Float:vl; \ - get_state(PART:"base", st, 30, vl); \ - if (strcmp(st, "disabled")) \ - run_program(PROGRAM:"selected"); \ - } \ - } \ - program { name: "unselected"CHECK; \ - signal: "mouse,up,1"; \ - source: CHECK; \ - script { \ - new st[31]; \ - new Float:vl; \ - get_state(PART:"base", st, 30, vl); \ - if (strcmp(st, "disabled")) \ - run_program(PROGRAM:"unselected"); \ - } \ - } - #define GENLIST_PROGRAM_SOUND( SRC ) \ program { name: "play_sound"SRC; \ signal: "mouse,clicked,1"; \ diff --git a/themes/widgets/genlist/genlist_normal.edc b/themes/widgets/genlist/genlist_normal.edc index 71b3516..02678b5 100644 --- a/themes/widgets/genlist/genlist_normal.edc +++ b/themes/widgets/genlist/genlist_normal.edc @@ -754,7 +754,6 @@ parts { GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon", "elm.padding.left") } - GENLIST_PROGRAM_CHECK("elm.icon") } // 2.2.1.16 (textblock) @@ -765,7 +764,6 @@ parts { GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon", "elm.padding.left") } - GENLIST_PROGRAM_CHECK("elm.icon") } // 2.2.1.17 @@ -776,7 +774,6 @@ GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon.1", "elm.padding.left") GENLIST_PART_ICON_BTN_02_RTB("elm.icon.2", "elm.padding.right", "elm.padding.top", "elm.padding.bottom") } - GENLIST_PROGRAM_CHECK("elm.icon.1") } // 2.2.1.17 (textblock) @@ -787,7 +784,6 @@ GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon.1", "elm.padding.left") GENLIST_PART_ICON_BTN_02_RTB("elm.icon.2", "elm.padding.right", "elm.padding.top", "elm.padding.bottom") } - GENLIST_PROGRAM_CHECK("elm.icon") } // 2.2.1.18 @@ -815,7 +811,6 @@ GENLIST_PART_FOCUS } GENLIST_PROGRAMS_NORMAL( target: "elm.text"; target: "elm.icon.1"; target: "elm.icon.2"; ) - GENLIST_PROGRAM_CHECK("elm.icon.1") GENLIST_PROGRAM_SOUND("elm.text") } @@ -847,7 +842,6 @@ GENLIST_PART_FOCUS } GENLIST_PROGRAMS_NORMAL( target: "elm.text"; target: "elm.icon.1"; target: "elm.icon.2"; target: "elm.icon.3"; ) - GENLIST_PROGRAM_CHECK("elm.icon.1") GENLIST_PROGRAM_SOUND("elm.text") } @@ -859,7 +853,6 @@ GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon.1", "elm.padding.left") GENLIST_PART_ICON_BIG_R("elm.icon.2", "elm.padding.right") } - GENLIST_PROGRAM_CHECK("elm.icon.1") } // 2.2.1.22 @@ -870,7 +863,6 @@ GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon.1", "elm.padding.left") GENLIST_PART_ICON_BTN_02_RTB("elm.icon.2", "elm.padding.right", "elm.padding.top", "elm.padding.bottom") } - GENLIST_PROGRAM_CHECK("elm.icon.1") } // 2.2.1.24 @@ -900,7 +892,6 @@ GENLIST_PART_FOCUS } GENLIST_PROGRAMS_NORMAL( target: "elm.text"; target: "elm.icon.1"; target: "elm.icon.2"; target: "elm.icon.3"; ) - GENLIST_PROGRAM_CHECK("elm.icon.1") GENLIST_PROGRAM_SOUND("elm.text") } @@ -2291,7 +2282,6 @@ parts { GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon", "elm.padding.left") } - GENLIST_PROGRAM_CHECK("elm.icon") } // 2.2.2.33 @@ -2301,7 +2291,6 @@ parts { GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon.1", "elm.padding.left") } - GENLIST_PROGRAM_CHECK("elm.icon.1") } // 2.2.2.34 @@ -2334,7 +2323,6 @@ } GENLIST_PROGRAMS_NORMAL( target: "elm.text.1"; target: "elm.text.2"; target: "elm.icon.1"; target: "elm.icon.2";) - GENLIST_PROGRAM_CHECK("elm.icon.1") GENLIST_PROGRAM_SOUND("elm.text.1") GENLIST_PROGRAM_SOUND("elm.text.2") } @@ -2370,7 +2358,6 @@ GENLIST_PART_FOCUS } GENLIST_PROGRAMS_NORMAL( target: "elm.text.1"; target: "elm.text.2"; ) - GENLIST_PROGRAM_CHECK("elm.icon.1") GENLIST_PROGRAM_SOUND("elm.text.1") GENLIST_PROGRAM_SOUND("elm.text.2") } -- 2.7.4