ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=dda15b88e37b271f1fb4069dae84cd6b131afd9b
commit dda15b88e37b271f1fb4069dae84cd6b131afd9b Author: Amitesh Singh <amitesh...@samsung.com> Date: Wed Apr 11 19:52:09 2018 +0900 theme: spin button - remove elm spin btn inheritance. --- data/elementary/themes/edc/efl/spin_button.edc | 307 +++++++++++++++++++++++-- 1 file changed, 294 insertions(+), 13 deletions(-) diff --git a/data/elementary/themes/edc/efl/spin_button.edc b/data/elementary/themes/edc/efl/spin_button.edc index 40e9492a2e..4d502e3779 100644 --- a/data/elementary/themes/edc/efl/spin_button.edc +++ b/data/elementary/themes/edc/efl/spin_button.edc @@ -206,23 +206,304 @@ group { "efl/spin_button:vertical"; } } -group { "efl/spin_button/inc_button"; - inherit: "elm/button/base/spinner/increase/default"; -} +group { name: "efl/spin_button/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/spin_button/dec_button"; - inherit: "elm/button/base/spinner/decrease/default"; +group { name: "efl/spin_button/dec_button"; + inherit: "efl/spin_button/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"; + } + } + } } -group { "efl/spin_button/text_button"; - inherit: "elm/button/base/spinner/default"; - alias: "efl/spin_button/text_button:vertical"; +group { name: "efl/spin_button/text_button"; + alias: "efl/spin_button/text_button:vertical"; + parts { + part { name: "bg"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + } + } + part { name: "elm.text"; + type: TEXT; + scale: 1; + effect: SHADOW BOTTOM; + description { state: "default" 0.0; + color: FN_COL_DEFAULT; + color_class: "spinner"; + rel1.to: "bg"; + rel2.to: "bg"; + text { font: FN; size: 10; + min: 1 1; + text_class: "spinner"; + ellipsis: -1; + } + } + description { state: "disabled" 0.0; + inherit: "default" 0.0 ; + color: FN_COL_DISABLE; + color_class: "spinner_disabled"; + } + } + 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_click"; + signal: "mouse,clicked,1"; + source: "over"; + script { + run_program(PROGRAM:"button_click2"); + } + } + program { name: "button_click2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "disabler"; + target: "elm.text"; + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "disabler"; + target: "elm.text"; + } + } } -group { "efl/spin_button/inc_button:vertical"; - inherit: "elm/button/base/spinner/increase/vertical"; +group { name: "efl/spin_button/inc_button:vertical"; + inherit: "efl/spin_button/inc_button"; + images.image: "sym_up_light_normal.png" COMP; + images.image: "sym_up_glow_normal.png" COMP; + images.image: "sym_up_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_up_light_normal.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + image.normal: "sym_up_glow_normal.png"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + image.normal: "sym_up_dark_normal.png"; + } + } + } } -group { "efl/spin_button/dec_button:vertical"; - inherit: "elm/button/base/spinner/decrease/vertical"; -} \ No newline at end of file +group { name: "efl/spin_button/dec_button:vertical"; + inherit: "efl/spin_button/dec_button"; + images.image: "sym_down_light_normal.png" COMP; + images.image: "sym_down_glow_normal.png" COMP; + images.image: "sym_down_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_down_light_normal.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + image.normal: "sym_down_glow_normal.png"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + image.normal: "sym_down_dark_normal.png"; + } + } + } + } --