theme: spin button - remove elm spin btn inheritance.

This commit is contained in:
Amitesh Singh 2018-04-11 19:52:09 +09:00
parent 34afc8bdfa
commit dda15b88e3
1 changed files with 295 additions and 14 deletions

View File

@ -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 { 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/dec_button";
inherit: "elm/button/base/spinner/decrease/default";
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/text_button";
inherit: "elm/button/base/spinner/default";
alias: "efl/spin_button/text_button: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/inc_button:vertical";
inherit: "elm/button/base/spinner/increase/vertical";
}
group { "efl/spin_button/dec_button:vertical";
inherit: "elm/button/base/spinner/decrease/vertical";
}
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";
}
}
}
}