From c7cd5c0a14b66e91c3176ce262cabfccbdbbafef Mon Sep 17 00:00:00 2001 From: Amitesh Singh Date: Wed, 11 Apr 2018 17:42:19 +0900 Subject: [PATCH] theme: calendar - remove elm btn inheritance. --- data/elementary/themes/edc/efl/calendar.edc | 180 +++++++++++++++++++- 1 file changed, 173 insertions(+), 7 deletions(-) diff --git a/data/elementary/themes/edc/efl/calendar.edc b/data/elementary/themes/edc/efl/calendar.edc index 86aee2ce42..2fd7e95233 100644 --- a/data/elementary/themes/edc/efl/calendar.edc +++ b/data/elementary/themes/edc/efl/calendar.edc @@ -541,11 +541,177 @@ group { "efl/calendar"; #undef CIT #undef CH + group { name: "efl/calendar/inc_button"; + images.image: "sym_right_light_normal.png" COMP; + images.image: "sym_right_glow_normal.png" COMP; + images.image: "sym_right_dark_normal.png" COMP; + script { + public mouse_down = 0; + public multi_down = 0; + } + parts { + part { name: "arrow.image"; + scale: 1; + description { state: "default" 0.0; + min: 15 15; + max: 15 15; + color_class: "F032L1"; + image.normal: "sym_right_light_normal.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + image.normal: "sym_right_glow_normal.png"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + image.normal: "sym_right_dark_normal.png"; + } + } + part { name: "over"; + type: RECT; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + part { name: "disabler"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { name: "button_press"; + signal: "mouse,down,1"; + source: "over"; + script { + if ((get_int(multi_down) == 0) && + (get_int(mouse_down) == 0)) { + set_int(mouse_down, 1); + run_program(PROGRAM:"button_press2"); + } + } + } + program { name: "button_press2"; + action: SIGNAL_EMIT "elm,action,press" ""; + after: "button_press_anim"; + } + program { name: "button_press_anim"; + action: STATE_SET "pressed" 0.0; + target: "arrow.image"; + } + program { name: "button_unpress"; + signal: "mouse,up,1"; + source: "over"; + script { + if (get_int(mouse_down) == 1) { + set_int(mouse_down, 0); + run_program(PROGRAM:"button_unpress2"); + run_program(PROGRAM:"button_unpress_anim"); + } + } + } + program { name: "button_unpress2"; + action: SIGNAL_EMIT "elm,action,unpress" ""; + } + program { name: "button_unpress_anim"; + action: STATE_SET "default" 0.0; + target: "arrow.image"; + } + program { name: "button_click"; + signal: "mouse,clicked,1"; + source: "over"; + script { + if (get_int(multi_down) == 0) { + run_program(PROGRAM:"button_click2"); + } + } + } + program { name: "action_unpressed"; + signal: "elm,action,unpressed"; + source: "elm"; + after: "button_unpress_anim"; + } + program { name: "action_pressed"; + signal: "elm,action,pressed"; + source: "elm"; + after: "button_press_anim"; + } + program { name: "button_click2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "access_pressed"; + signal: "elm,action,anim,activate"; + source: "elm"; + action: STATE_SET "pressed" 0.0; + target: "arrow.image"; + after: "access_pressed_anim"; + } + program { name: "access_pressed_anim"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.1; + target: "arrow.image"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "arrow.image"; + target: "disabler"; + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "arrow.image"; + target: "disabler"; + } + program { + name: "multi_down"; + signal: "elm,action,multi,down"; + source: "elm"; + script { + set_int(multi_down, 1); + } + } + program { + name: "multi_up"; + signal: "elm,action,multi,up"; + source: "elm"; + script { + set_int(multi_down, 0); + } + } + } + } -group { "efl/calendar/inc_button"; - inherit: "elm/button/base/calendar/increase/default"; -} - -group { "efl/calendar/dec_button"; - inherit: "elm/button/base/calendar/decrease/default"; -} + group { name: "efl/calendar/dec_button"; + inherit: "efl/calendar/inc_button"; + images.image: "sym_left_light_normal.png" COMP; + images.image: "sym_left_glow_normal.png" COMP; + images.image: "sym_left_dark_normal.png" COMP; + parts { + part { name: "arrow.image"; + scale: 1; + description { state: "default" 0.0; + min: 15 15; + max: 15 15; + image.normal: "sym_left_light_normal.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + image.normal: "sym_left_glow_normal.png"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + image.normal: "sym_left_dark_normal.png"; + } + } + } + } \ No newline at end of file