rel2.to: "bg";
}
}
- part { name: "elm.text.left"; type: TEXT; mouse_events: 0;
+ part { name: "elm.text.left"; type: TEXT;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
color_class: "button_text_disabled";
}
}
- part { name: "elm.text.center"; type: TEXT; mouse_events: 0;
+ part { name: "elm.text.center"; type: TEXT;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
color_class: "button_text_disabled";
}
}
- part { name: "elm.text.right"; type: TEXT; mouse_events: 0;
+ part { name: "elm.text.right"; type: TEXT;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
action: SIGNAL_EMIT "elm.drag_button,mouse,move" "elm";
}
program {
+ signal: "mouse,down,1*"; source: "elm.text.right";
+ action: SIGNAL_EMIT "elm,right,mouse,down" "elm";
+ }
+ program {
+ signal: "mouse,down,1*"; source: "elm.text.left";
+ action: SIGNAL_EMIT "elm,left,mouse,down" "elm";
+ }
+ program {
+ signal: "mouse,down,1*"; source: "elm.text.center";
+ action: SIGNAL_EMIT "elm,center,mouse,down" "elm";
+ }
+ program {
signal: "elm,state,disabled"; source: "elm";
action: STATE_SET "disabled" 0.0;
target: "bg";
}
static void
+_track_move_cb(void *data,
+ Evas_Object *o __UNUSED__,
+ const char *emission,
+ const char *source __UNUSED__)
+{
+ Evas_Object *obj = data;
+
+ ELM_ACTIONSLIDER_DATA_GET(obj, sd);
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+
+ if (!strcmp(emission, "elm.right,mouse,down"))
+ {
+ if (sd->final_position == 0.0)
+ {
+ if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)
+ {
+ evas_object_smart_callback_call(obj, SIG_CHANGED, "center");
+ sd->final_position = 0.5;
+ }
+ else if (sd->enabled_position & ELM_ACTIONSLIDER_RIGHT)
+ {
+ evas_object_smart_callback_call(obj, SIG_CHANGED, "right");
+ sd->final_position = 1.0;
+ }
+ }
+ else if ((sd->final_position == 0.5) &&
+ (sd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
+ {
+ evas_object_smart_callback_call(obj, SIG_CHANGED, "right");
+ sd->final_position = 1.0;
+ }
+ }
+ else if (!strcmp(emission, "elm.center,mouse,down"))
+ {
+ if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)
+ {
+ evas_object_smart_callback_call(obj, SIG_CHANGED, "center");
+ sd->final_position = 0.5;
+ }
+ }
+ else
+ {
+ if (sd->final_position == 1.0)
+ {
+ if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)
+ {
+ evas_object_smart_callback_call(obj, SIG_CHANGED, "center");
+ sd->final_position = 0.5;
+ }
+ else if (sd->enabled_position & ELM_ACTIONSLIDER_LEFT)
+ {
+ evas_object_smart_callback_call(obj, SIG_CHANGED, "left");
+ sd->final_position = 0.0;
+ }
+ }
+ else if (sd->final_position == 0.5 &&
+ (sd->enabled_position & ELM_ACTIONSLIDER_LEFT))
+ {
+ evas_object_smart_callback_call(obj, SIG_CHANGED, "left");
+ sd->final_position = 0.0;
+ }
+ }
+ if (sd->button_animator) ecore_animator_del(sd->button_animator);
+ sd->button_animator = ecore_animator_add(_button_animator, obj);
+}
+
+static void
_mirrored_part_fix(const Evas_Object *obj,
const char **part)
{
edje_object_signal_callback_add
(wd->resize_obj, "elm.drag_button,mouse,move", "*",
_drag_button_move_cb, obj);
+ edje_object_signal_callback_add
+ (wd->resize_obj, "elm,right,mouse,down", "*",
+ _track_move_cb, obj);
+ edje_object_signal_callback_add
+ (wd->resize_obj, "elm,left,mouse,down", "*",
+ _track_move_cb, obj);
+ edje_object_signal_callback_add
+ (wd->resize_obj, "elm,center,mouse,down", "*",
+ _track_move_cb, obj);
if (!elm_layout_theme_set
(obj, "actionslider", "base", elm_widget_style_get(obj)))