summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2017-02-02 11:18:17 (GMT)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-06-02 05:22:42 (GMT)
commitcd9b4da21dd8ad56b305bba82d25c1c0facc4f23 (patch)
tree778762d3acb9de4436a2d11bbe16bff4c81de648
parent814bc44e54b57815eca0f7751956d3a1c2d6db68 (diff)
downloadefl-theme-tizen-mobile-cd9b4da21dd8ad56b305bba82d25c1c0facc4f23.zip
efl-theme-tizen-mobile-cd9b4da21dd8ad56b305bba82d25c1c0facc4f23.tar.gz
efl-theme-tizen-mobile-cd9b4da21dd8ad56b305bba82d25c1c0facc4f23.tar.bz2
[Spinner] Modify effect size calculation of increase/decrease buttonrefs/changes/37/132237/2
Modified to calculate 70% instead of defining size of the button effect like the default button Change-Id: If851c46c08f3d1321d3c543d2ac7798b694a8e62
-rw-r--r--mobile/widgets/datetime.edc54
-rw-r--r--mobile/widgets/spinner.edc781
2 files changed, 550 insertions, 285 deletions
diff --git a/mobile/widgets/datetime.edc b/mobile/widgets/datetime.edc
index f6cdb64..f0fa6f2 100644
--- a/mobile/widgets/datetime.edc
+++ b/mobile/widgets/datetime.edc
@@ -934,13 +934,18 @@ group { "elm/button/base/spinner/increase/datetime/default";
desc { "default";
color: 255 255 255 0;
color_class: "datetime/default/effect_icon";
+ hid;
}
- desc { "pressed";
+ desc { "ready";
inherit: "default";
+ vis;
+ }
+ desc { "pressed";
+ inherit: "ready";
color: 255 255 255 255;
}
}
- image { "icon";
+ rect { "clipper_icon";
desc { "default";
color_class: "datetime/default/icon";
}
@@ -962,13 +967,18 @@ group { "elm/button/base/spinner/increase/datetime/time_layout";
desc { "default";
color: 255 255 255 0;
color_class: "datetime/time_layout/effect_icon";
+ hid;
}
- desc { "pressed";
+ desc { "ready";
inherit: "default";
+ vis;
+ }
+ desc { "pressed";
+ inherit: "ready";
color: 255 255 255 255;
}
}
- image { "icon";
+ rect { "clipper_icon";
desc { "default";
color_class: "datetime/time_layout/icon";
}
@@ -989,13 +999,18 @@ group { "elm/button/base/spinner/increase/datetime/time_layout_24hr";
desc { "default";
color: 255 255 255 0;
color_class: "datetime/time_layout_24hr/effect_icon";
+ hid;
}
- desc { "pressed";
+ desc { "ready";
inherit: "default";
+ vis;
+ }
+ desc { "pressed";
+ inherit: "ready";
color: 255 255 255 255;
}
}
- image { "icon";
+ rect { "clipper_icon";
desc { "default";
color_class: "datetime/time_layout_24hr/icon";
}
@@ -1019,13 +1034,18 @@ group { "elm/button/base/spinner/decrease/datetime/default";
desc { "default";
color: 255 255 255 0;
color_class: "datetime/default/effect_icon";
+ hid;
}
- desc { "pressed";
+ desc { "ready";
inherit: "default";
+ vis;
+ }
+ desc { "pressed";
+ inherit: "ready";
color: 255 255 255 255;
}
}
- image { "icon";
+ rect { "clipper_icon";
desc { "default";
color_class: "datetime/default/icon";
}
@@ -1047,13 +1067,18 @@ group { "elm/button/base/spinner/decrease/datetime/time_layout";
desc { "default";
color: 255 255 255 0;
color_class: "datetime/time_layout/effect_icon";
+ hid;
}
- desc { "pressed";
+ desc { "ready";
inherit: "default";
+ vis;
+ }
+ desc { "pressed";
+ inherit: "ready";
color: 255 255 255 255;
}
}
- image { "icon";
+ rect { "clipper_icon";
desc { "default";
color_class: "datetime/time_layout/icon";
}
@@ -1074,13 +1099,18 @@ group { "elm/button/base/spinner/decrease/datetime/time_layout_24hr";
desc { "default";
color: 255 255 255 0;
color_class: "datetime/time_layout_24hr/effect_icon";
+ hid;
}
- desc { "pressed";
+ desc { "ready";
inherit: "default";
+ vis;
+ }
+ desc { "pressed";
+ inherit: "ready";
color: 255 255 255 255;
}
}
- image { "icon";
+ rect { "clipper_icon";
desc { "default";
color_class: "datetime/time_layout_24hr/icon";
}
diff --git a/mobile/widgets/spinner.edc b/mobile/widgets/spinner.edc
index 7acd903..b129075 100644
--- a/mobile/widgets/spinner.edc
+++ b/mobile/widgets/spinner.edc
@@ -522,103 +522,348 @@ group { "elm/spinner/base/vertical";
}
}
-#define BUTTON_SPINNER_BG_EFFECT_PARTS(corner_size, ratio, sizer_bg_effect, clipper_bg_effect, top_left, top_right, mid, bottom_left, bottom_right) \
- vector { "bg_effect_top_left"; \
- clip: clipper_bg_effect; \
- desc { "default"; \
- align: 0.0 0.0; \
- max: corner_size*ratio corner_size*ratio; \
- rel.to: sizer_bg_effect; \
- rel1.relative: 0.0 0.0; \
- rel2.relative: 0.5 0.5; \
- image.normal: top_left; \
+
+ #define BUTTON_VECTOR_PART(min_size, ratio, vector_base, clipper_vector_base, left_top, right_top, mid, left_bottom, right_bottom) \
+ vector { vector_base"_top_left"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ align: 0.0 0.0; \
+ max: (min_size)*ratio (min_size)*ratio; \
+ rel1.to: vector_base; \
+ rel2.to: vector_base; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ image.normal: left_top; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ min: min_size min_size; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- desc { "pressed"; \
- inherit: "default"; \
- max: corner_size corner_size; \
+ vector { vector_base"_top_right"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ align: 1.0 0.0; \
+ max: (min_size)*ratio (min_size)*ratio; \
+ rel1.to: vector_base; \
+ rel2.to: vector_base; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ image.normal: right_top; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ min: min_size min_size; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- } \
- vector { "bg_effect_top_right"; \
- clip: clipper_bg_effect; \
- desc { "default"; \
- align: 1.0 0.0; \
- max: corner_size*ratio corner_size*ratio; \
- rel.to: sizer_bg_effect; \
- rel1.relative: 0.5 0.0; \
- rel2.relative: 1.0 0.5; \
- image.normal: top_right; \
+ vector { vector_base"_top_mid"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ rel1.to: vector_base"_top_left"; \
+ rel1.relative: 1.0 0.0; \
+ rel2.to: vector_base"_top_right"; \
+ rel2.relative: 0.0 1.0; \
+ image.normal: mid; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- desc { "pressed"; \
- inherit: "default"; \
- max: corner_size corner_size; \
+ vector { vector_base"_mid"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ rel1.to: vector_base"_top_left"; \
+ rel1.relative: 0.0 1.0; \
+ rel2.to: vector_base"_bottom_right"; \
+ rel2.relative: 1.0 0.0; \
+ image.normal: mid; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- } \
- vector { "bg_effect_top_mid"; \
- clip: clipper_bg_effect; \
- desc { "default"; \
- rel1.to: "bg_effect_top_left"; \
- rel1.relative: 1.0 0.0; \
- rel2.to: "bg_effect_top_right"; \
- rel2.relative: 0.0 1.0; \
- image.normal: mid; \
+ vector { vector_base"_bottom_left"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ align: 0.0 1.0; \
+ max: (min_size)*ratio (min_size)*ratio; \
+ rel1.to: vector_base; \
+ rel2.to: vector_base; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ image.normal: left_bottom; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ min: min_size min_size; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- } \
- vector { "bg_effect_mid"; \
- clip: clipper_bg_effect; \
- desc { "default"; \
- rel1.to: "bg_effect_top_left"; \
- rel1.relative: 0.0 1.0; \
- rel2.to: "bg_effect_bottom_right"; \
- rel2.relative: 1.0 0.0; \
- image.normal: mid; \
+ vector { vector_base"_bottom_right"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ align: 1.0 1.0; \
+ max: (min_size)*ratio (min_size)*ratio; \
+ rel1.to: vector_base; \
+ rel2.to: vector_base; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ image.normal: right_bottom; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ min: min_size min_size; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- } \
- vector { "bg_effect_bottom_left"; \
- clip: clipper_bg_effect; \
- desc { "default"; \
- align: 0.0 1.0; \
- max: corner_size*ratio corner_size*ratio; \
- rel.to: sizer_bg_effect; \
- rel1.relative: 0.0 0.5; \
- rel2.relative: 0.5 1.0; \
- image.normal: bottom_left; \
+ vector { vector_base"_bottom_mid"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ rel1.to: vector_base"_bottom_left"; \
+ rel1.relative: 1.0 0.0; \
+ rel2.to: vector_base"_bottom_right"; \
+ rel2.relative: 0.0 1.0; \
+ image.normal: mid; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- desc { "pressed"; \
- inherit: "default"; \
- max: corner_size corner_size; \
+ vector { vector_base"_top_left_rtl"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ align: 0.0 0.0; \
+ max: (min_size)*ratio (min_size)*ratio; \
+ rel1.to: vector_base; \
+ rel2.to: vector_base; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ image.normal: right_top; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ min: min_size min_size; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- } \
- vector { "bg_effect_bottom_right"; \
- clip: clipper_bg_effect; \
- desc { "default"; \
- align: 1.0 1.0; \
- max: corner_size*ratio corner_size*ratio; \
- rel.to: sizer_bg_effect; \
- rel1.relative: 0.5 0.5; \
- rel2.relative: 1.0 1.0; \
- image.normal: bottom_right; \
+ vector { vector_base"_top_right_rtl"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ align: 1.0 0.0; \
+ max: (min_size)*ratio (min_size)*ratio; \
+ rel1.to: vector_base; \
+ rel2.to: vector_base; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ image.normal: left_top; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ min: min_size min_size; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- desc { "pressed"; \
- inherit: "default"; \
- max: corner_size corner_size; \
+ vector { vector_base"_top_mid_rtl"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ rel1.to: vector_base"_top_left_rtl"; \
+ rel1.relative: 1.0 0.0; \
+ rel2.to: vector_base"_top_right_rtl"; \
+ rel2.relative: 0.0 1.0; \
+ image.normal: mid; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- } \
- vector { "bg_effect_bottom_mid"; \
- clip: clipper_bg_effect; \
- desc { "default"; \
- rel1.to: "bg_effect_bottom_left"; \
- rel1.relative: 1.0 0.0; \
- rel2.to: "bg_effect_bottom_right"; \
- rel2.relative: 0.0 1.0; \
- image.normal: mid; \
+ vector { vector_base"_mid_rtl"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ rel1.to: vector_base"_top_left_rtl"; \
+ rel1.relative: 0.0 1.0; \
+ rel2.to: vector_base"_bottom_right_rtl"; \
+ rel2.relative: 1.0 0.0; \
+ image.normal: mid; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
} \
- }
+ vector { vector_base"_bottom_left_rtl"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ align: 0.0 1.0; \
+ max: (min_size)*ratio (min_size)*ratio; \
+ rel1.to: vector_base; \
+ rel2.to: vector_base; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ image.normal: right_bottom; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ min: min_size min_size; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
+ } \
+ vector { vector_base"_bottom_right_rtl"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ align: 1.0 1.0; \
+ max: (min_size)*ratio (min_size)*ratio; \
+ rel1.to: vector_base; \
+ rel2.to: vector_base; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ image.normal: left_bottom; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ min: min_size min_size; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
+ } \
+ vector { vector_base"_bottom_mid_rtl"; \
+ clip: clipper_vector_base; \
+ desc { "default"; \
+ vis; \
+ rel1.to: vector_base"_bottom_left_rtl"; \
+ rel1.relative: 1.0 0.0; \
+ rel2.to: vector_base"_bottom_right_rtl"; \
+ rel2.relative: 0.0 1.0; \
+ image.normal: mid; \
+ } \
+ desc { "ready"; \
+ inherit: "default"; \
+ } \
+ desc { "pressed"; \
+ inherit: "ready"; \
+ } \
+ desc { "hidden" \
+ hid; \
+ } \
+ }
+
+ #define BUTTON_VECTOR_PART_MIRRORED_SET_STATE(vector_base, _rtl, _state) \
+ set_state(PART:vector_base"_top_left"_rtl, _state, 0.0); \
+ set_state(PART:vector_base"_top_right"_rtl, _state, 0.0); \
+ set_state(PART:vector_base"_bottom_left"_rtl, _state, 0.0); \
+ set_state(PART:vector_base"_bottom_right"_rtl, _state, 0.0); \
+ set_state(PART:vector_base"_top_mid"_rtl, _state, 0.0); \
+ set_state(PART:vector_base"_mid"_rtl, _state, 0.0); \
+ set_state(PART:vector_base"_bottom_mid"_rtl, _state, 0.0);
+
+ #define BUTTON_VECTOR_PART_MIRRORED_PROGRAM( _icon ) \
+ program { "rtl_mirrored"; \
+ signal: "edje,state,rtl"; \
+ source: "edje"; \
+ script { \
+ set_int(rtl_mode, 1); \
+ if( strcmp(#_icon, "icon")) { \
+ set_state(PART:_icon, "rtl", 0.0); \
+ } \
+ } \
+ } \
+ program { "ltr_mirrored"; \
+ signal: "edje,state,ltr"; \
+ source: "edje"; \
+ script { \
+ set_int(rtl_mode, 0); \
+ if( strcmp(#_icon, "icon")) { \
+ set_state(PART:_icon, "default", 0.0); \
+ } \
+ } \
+ }
+
group { "elm/button/base/spinner/increase/default";
alias: "elm/button/base/spinner/increase/horizontal";
inherit: "elm/button/base/spinner/increase/template";
- //data.item: "focus_highlight" "on"; // We need to set data item after applying focus_image properly.
- target_group: "bg_effect_group" "bg_effect_top_left" "bg_effect_top_right" "bg_effect_bottom_left" "bg_effect_bottom_right";
images {
vector: "core_press_top_left.svg";
vector: "core_press_top_right.svg";
@@ -627,20 +872,42 @@ group { "elm/button/base/spinner/increase/default";
vector: "core_press_center.svg";
image: "core_icon_picker_arrow_right.png" COMP;
}
- script {
- public disabled = 0;
- public animate = 0;
- }
+ target_group: "bg_effect_vector" "bg_effect_top_left" "bg_effect_top_right" "bg_effect_bottom_left" "bg_effect_bottom_right";
+
parts {
- //Effect Shape Part
- spacer { "sizer_bg_effect";
+ spacer { "base";
+ scale;
+ nomouse;
+ desc { "default";
+ min: SPINNER_LEFT_RIGHT_BG_IMAGE_SIZE_INC;
+ max: SPINNER_LEFT_RIGHT_BG_IMAGE_SIZE_INC;
+ fixed: 1 1;
+ }
+ }
+ spacer { "effect_spacer";
scale;
desc { "default";
rel.to: "base";
+ }
+ }
+ BUTTON_VECTOR_PART(BUTTON_NAVIFRAME_BACK_CORNER_RADIUS
+ , 0.7
+ , "bg_effect", "clipper_bg_effect"
+ , "core_press_top_left.svg", "core_press_top_right.svg"
+ , "core_press_center.svg"
+ , "core_press_bottom_left.svg", "core_press_bottom_right.svg");
+ //Effect Shape Part
+ swallow { "bg_effect";
+ clip: "clipper_bg_effect";
+ scale;
+ desc { "default";
+ fixed: 1 1;
+ rel.to: "effect_spacer";
rel1.relative: 0.5 0.5;
rel2.relative: 0.5 0.5;
- min: SPINNER_LEFT_RIGHT_EFFECT_MIN_SIZE_INC;
- fixed: 1 1;
+ }
+ desc { "ready";
+ inherit: "default";
}
desc { "pressed";
inherit: "default";
@@ -648,62 +915,78 @@ group { "elm/button/base/spinner/increase/default";
rel2.relative: 1.0 1.0;
}
}
- BUTTON_SPINNER_BG_EFFECT_PARTS(SPINNER_BUTTON_CORNER_RADIUS,
- 0.7,
- "sizer_bg_effect",
- "clipper_bg_effect",
- "core_press_top_left.svg",
- "core_press_top_right.svg",
- "core_press_center.svg",
- "core_press_bottom_left.svg",
- "core_press_bottom_right.svg")
-
rect { "clipper_bg_effect";
desc { "default";
fixed: 1 1;
- rel.to: "sizer_bg_effect";
+ rel.to: "bg_effect";
color: 255 255 255 0;
color_class: "spinner/default/effect_icon";
+ hid;
}
- desc { "pressed";
+ desc { "ready";
inherit: "default";
+ vis;
+ }
+ desc { "pressed";
+ inherit: "ready";
color: 255 255 255 255;
}
}
image { "icon";
scale;
- after: "clipper_bg_effect";
+ nomouse;
+ clip: "clipper_icon";
+ after: "bg_effect";
desc { "default";
image.normal: "core_icon_picker_arrow_right.png";
- rel.to: "base";
min: SPINNER_LEFT_RIGHT_ARROW_IMAGE_SIZE_INC;
max: SPINNER_LEFT_RIGHT_ARROW_IMAGE_SIZE_INC;
fixed: 1 1;
+ }
+ desc { "rtl";
+ inherit: "default";
+ map.on: 1;
+ map.rotation.y: 180.0;
+ }
+ }
+ rect { "clipper_icon";
+ scale;
+ desc { "default";
color_class: "spinner/default/icon";
}
desc { "pressed";
- inherit: "default";
color_class: "spinner/default/icon_pressed";
}
desc { "disabled";
- inherit: "default";
color_class: "spinner/default/icon_disabled";
}
}
- spacer { "focus_image";
- after: "icon";
- scale: 1;
+ rect { "event";
+ after: "clipper_icon";
+ mouse;
desc { "default";
- align: 0.5 0.0;
- rel.to: "icon";
- }
- desc { "focused";
- inherit: "default";
+ color: 0 0 0 0;
+ rel.to: "base";
}
}
- rect { "event";
- after: "focus_image";
- mouse;
+ }
+ script {
+ public mouse_down = 0;
+ public animate = 0;
+ public disabled = 0;
+ public minw = 0;
+ public minh = 0;
+ public rtl_mode = 0;
+ public get_effect_min_size(base_effect, Float:ratio, min_w, min_h) {
+ new x, y, w, h;
+ get_geometry(base_effect, x, y, w, h);
+ if (w > h) {
+ set_float(min_w, (w - h * (1 - ratio)) / w);
+ set_float(min_h, ratio);
+ } else {
+ set_float(min_w, ratio);
+ set_float(min_h, (h - w * (1 - ratio)) / h);
+ }
}
}
program_remove: "unpressed";
@@ -711,95 +994,133 @@ group { "elm/button/base/spinner/increase/default";
programs {
program { "on_pressed";
script {
- if (get_int(disabled) == 0) {
- stop_program(PROGRAM:"delay_effect_unpressed");
+ if ((get_int(mouse_down) == 0) && (get_int(disabled) == 0)) {
+ new Float:rel_w, Float:rel_h;
+ stop_program(PROGRAM:"delay_unpressed_effect");
+ set_int(mouse_down, 1);
set_int(animate, 1);
- run_program(PROGRAM:"anim_effect_pressed");
+ custom_state(PART:"bg_effect", "ready", 0.0);
+ get_effect_min_size(PART:"effect_spacer", 0.7, minw, minh);
+ rel_w = (1 - get_float(minw)) / 2;
+ rel_h = (1 - get_float(minh)) / 2;
+ set_state_val(PART:"bg_effect", STATE_REL1, rel_w, rel_h);
+ set_state_val(PART:"bg_effect", STATE_REL2, 1 - rel_w, 1 - rel_h);
+ run_program(PROGRAM:"pressed_effect");
}
}
}
- program { "anim_effect_pressed";
- action: STATE_SET "default";
- target: "sizer_bg_effect";
- target_groups: "bg_effect_group";
-
- sequence {
- action: STATE_SET "pressed";
- target: "sizer_bg_effect";
- target: "clipper_bg_effect";
- target: "icon";
- target_groups: "bg_effect_group";
- transition: GLIDE_EASE_OUT(0.15);
-
- script {
- set_int(animate, 0);
+ program { "unpressed";
+ signal: "mouse,up,1";
+ source: "event";
+ script {
+ if (get_int(mouse_down) == 1) {
+ set_int(mouse_down, 0);
+ if (get_int(disabled) == 0) {
+ if (get_int(animate) == 0) {
+ run_program(PROGRAM:"unpressed_effect");
+ } else {
+ set_state(PART:"bg_effect", "pressed", 0.0);
+ set_int(animate, 0);
+ run_program(PROGRAM:"delay_unpressed_effect");
+ }
+ emit("elm,action,unpress", "");
+ }
}
}
}
- program { "unpressed";
- signal: "mouse,up,1";
+ program { "clicked";
+ signal: "mouse,clicked,1";
source: "event";
script {
if (get_int(disabled) == 0) {
- if (get_int(animate) == 0) {
- run_program(PROGRAM:"anim_effect_unpressed");
- } else {
- run_program(PROGRAM:"set_effect_pressed");
- }
- emit("elm,action,unpress", "");
+ run_program(PROGRAM:"play_sound");
+ run_program(PROGRAM:"clicked_signal");
}
}
}
- program { "set_effect_pressed";
+ program { "on_enabled";
+ script {
+ set_int(disabled, 0);
+ set_state(PART:"clipper_icon", "default", 0.0);
+ }
+ }
+ program { "on_disabled";
+ script {
+ set_int(disabled, 1);
+ if (get_int(animate) == 1) return;
+ set_state(PART:"clipper_icon", "disabled", 0.0);
+ }
+ }
+ program { "pressed_effect";
+ script {
+ if(get_int(rtl_mode) == 0) {
+ BUTTON_VECTOR_PART_MIRRORED_SET_STATE("bg_effect","","default")
+ BUTTON_VECTOR_PART_MIRRORED_SET_STATE("bg_effect","_rtl","hidden")
+ }
+ else if(get_int(rtl_mode) == 1) {
+ BUTTON_VECTOR_PART_MIRRORED_SET_STATE("bg_effect","_rtl","default")
+ BUTTON_VECTOR_PART_MIRRORED_SET_STATE("bg_effect","","hidden")
+ }
+ set_state(PART:"clipper_bg_effect", "ready", 0.0);
+ set_state(PART:"bg_effect", "custom", 0.0);
+ run_program(PROGRAM:"pressed_effect2");
+ }
+ }
+ program { "pressed_effect2";
+ script {
+ if(get_int(rtl_mode) == 0) {
+ BUTTON_VECTOR_PART_MIRRORED_SET_STATE("bg_effect","","pressed")
+ }
+ else if(get_int(rtl_mode) == 1) {
+ BUTTON_VECTOR_PART_MIRRORED_SET_STATE("bg_effect","_rtl","pressed")
+ }
+ run_program(PROGRAM:"pressed_effect2_1");
+ }
+ }
+ program { "pressed_effect2_1";
action: STATE_SET "pressed";
- target_groups: "bg_effect_group";
- target: "sizer_bg_effect";
target: "clipper_bg_effect";
- target: "icon";
- after: "delay_effect_unpressed";
+ target: "bg_effect";
+ target: "clipper_icon";
+ transition: GLIDE_EASE_OUT(0.15);
+ after: "pressed_effect3";
+ }
+ program { "pressed_effect3";
+ script {
+ set_int(animate, 0);
+ }
}
- program { "delay_effect_unpressed";
+ program { "delay_unpressed_effect";
in: 0.1 0.0;
- after: "anim_effect_unpressed";
+ after: "unpressed_effect";
}
- program { "anim_effect_unpressed";
+ program { "unpressed_effect";
script {
- if (get_int(disabled) == 0) {
- run_program(PROGRAM:"anim_effect_unpressed2");
- } else {
- run_program(PROGRAM:"anim_effect_disabled");
- }
- run_program(PROGRAM:"anim_effect_unpressed3");
+ run_program(PROGRAM:"unpressed_effect2");
+ run_program(PROGRAM:"unpressed_effect2_1");
}
}
- program { "anim_effect_unpressed2";
- action: STATE_SET "default";
- target: "icon";
- transition: GLIDE_EASE_OUT(0.45);
- }
- program { "anim_effect_disabled";
- action: STATE_SET "disabled";
- target: "icon";
+ program { "unpressed_effect2";
+ action: STATE_SET "ready";
+ target: "clipper_bg_effect";
transition: GLIDE_EASE_OUT(0.45);
+ after: "unpressed_effect3";
}
- program { "anim_effect_unpressed3";
+ program { "unpressed_effect2_1";
action: STATE_SET "default";
- target: "clipper_bg_effect";
+ target: "clipper_icon";
transition: GLIDE_EASE_OUT(0.45);
-
- sequence {
- action: STATE_SET "default";
- target: "sizer_bg_effect";
- }
}
- program { "clicked";
- signal: "mouse,clicked,1";
- source: "event";
+ program { "unpressed_effect3";
script {
- if (get_int(disabled) == 0) {
- run_program(PROGRAM:"play_sound");
- run_program(PROGRAM:"clicked_signal");
+ if(get_int(rtl_mode) == 0) {
+ BUTTON_VECTOR_PART_MIRRORED_SET_STATE("bg_effect","","default")
}
+ else if(get_int(rtl_mode) == 1) {
+ BUTTON_VECTOR_PART_MIRRORED_SET_STATE("bg_effect","_rtl","default")
+ }
+ set_state(PART:"clipper_bg_effect", "default", 0.0);
+ set_state(PART:"bg_effect", "default", 0.0);
}
}
program { "play_sound";
@@ -809,63 +1130,22 @@ group { "elm/button/base/spinner/increase/default";
in: 0.001 0.0;
action: SIGNAL_EMIT "elm,action,click" "";
}
- program { "action_focus";
- signal: "elm,action,focus_highlight,show";
- source: "elm";
- action: STATE_SET "focused";
- target: "focus_image";
- }
- program { "action_unfocus";
- signal: "elm,action,focus_highlight,hide";
- source: "elm";
- action: STATE_SET "default";
- target: "focus_image";
- }
- program { "access_pressed";
- signal: "elm,action,anim,activate";
- source: "elm";
- after: "set_effect_pressed";
- }
- program { "on_disabled";
- script {
- set_int(disabled, 1);
- if (get_int(animate) == 1) return;
- set_state(PART:"icon", "disabled", 0.0);
- }
- }
- program { "on_enabled";
- script {
- set_int(disabled, 0);
- set_state(PART:"icon", "default", 0.0);
- }
- }
+
+ BUTTON_VECTOR_PART_MIRRORED_PROGRAM("icon")
}
}
+
group { "elm/button/base/spinner/decrease/default";
inherit: "elm/button/base/spinner/increase/default";
alias: "elm/button/base/spinner/decrease/horizontal";
images {
- vector: "core_press_top_left.svg";
- vector: "core_press_top_right.svg";
- vector: "core_press_bottom_left.svg";
- vector: "core_press_bottom_right.svg";
- vector: "core_press_center.svg";
image: "core_icon_picker_arrow_left.png" COMP;
}
parts {
image { "icon";
desc { "default";
image.normal: "core_icon_picker_arrow_left.png";
- color_class: "spinner/default/icon";
- }
- desc { "pressed";
- inherit: "default";
- color_class: "spinner/default/icon_pressed";
- }
- desc { "disabled";
- inherit: "default";
- color_class: "spinner/default/icon_disabled";
}
}
}
@@ -970,66 +1250,31 @@ group { "elm/button/base/spinner/increase/vertical";
inherit: "elm/button/base/spinner/increase/default";
//data.item: "focus_highlight" "on"; // We need to set data item after applying focus_image properly.
images {
- vector: "core_press_top_left.svg";
- vector: "core_press_top_right.svg";
- vector: "core_press_bottom_left.svg";
- vector: "core_press_bottom_right.svg";
- vector: "core_press_center.svg";
image: "core_icon_picker_arrow_up.png" COMP;
}
- script {
- public disabled = 0;
- public animate = 0;
- }
parts {
//Effect Shape Part
- spacer { "sizer_bg_effect";
- scale;
+ spacer { "base";
desc { "default";
- rel.to: "base";
- rel1.relative: 0.5 0.5;
- rel2.relative: 0.5 0.5;
- min: SPINNER_UP_DOWN_EFFECT_MIN_SIZE_INC;
- fixed: 1 1;
- }
- desc { "pressed";
- inherit: "default";
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
+ min: SPINNER_UP_DOWN_BG_IMAGE_SIZE_INC;
+ max: SPINNER_UP_DOWN_BG_IMAGE_SIZE_INC;
}
}
- rect { "clipper_bg_effect";
+ spacer { "bg_spacer";
desc { "default";
- color: 255 255 255 0;
- color_class: "spinner/vertical/effect_icon";
- }
- desc { "pressed";
- inherit: "default";
- color: 255 255 255 255;
+ min: SPINNER_UP_DOWN_BG_IMAGE_SIZE_INC;
+ max: SPINNER_UP_DOWN_BG_IMAGE_SIZE_INC;
}
}
image { "icon";
- scale;
desc { "default";
image.normal: "core_icon_picker_arrow_up.png";
- rel.to: "base";
min: SPINNER_UP_DOWN_ARROW_IMAGE_SIZE_INC;
max: SPINNER_UP_DOWN_ARROW_IMAGE_SIZE_INC;
- fixed: 1 1;
- color_class: "spinner/vertical/icon";
- }
- desc { "pressed";
- inherit: "default";
- color_class: "spinner/vertical/icon_pressed";
- }
- desc { "disabled";
- inherit: "default";
- color_class: "spinner/vertical/icon_disabled";
}
}
}
}
-
group { "elm/button/base/spinner/decrease/vertical";
inherit: "elm/button/base/spinner/increase/vertical";
images {
@@ -1039,20 +1284,10 @@ group { "elm/button/base/spinner/decrease/vertical";
image { "icon";
desc { "default";
image.normal: "core_icon_picker_arrow_down.png";
- color_class: "spinner/vertical/icon";
- }
- desc { "pressed";
- inherit: "default";
- color_class: "spinner/vertical/icon_pressed";
- }
- desc { "disabled";
- inherit: "default";
- color_class: "spinner/vertical/icon_disabled";
}
}
}
}
-#undef BUTTON_SPINNER_BG_EFFECT_PARTS
group { "elm/button/base/spinner/vertical";
inherit: "elm/button/base/spinner/default";