forked from enlightenment/efl
elm_code: Cancel selection if clicked outside of the editor area
This commit is contained in:
parent
87a93b8521
commit
14d10e8b7b
|
@ -1178,6 +1178,17 @@ _elm_code_widget_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj E
|
|||
_elm_code_widget_clicked_readonly_cb(widget, row);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_code_widget_scroller_clicked_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Elm_Code_Widget *widget;
|
||||
|
||||
widget = (Elm_Code_Widget *)data;
|
||||
|
||||
elm_code_widget_selection_clear(widget);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_code_widget_cursor_move_home(Elm_Code_Widget *widget)
|
||||
{
|
||||
|
@ -2296,6 +2307,8 @@ _elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd)
|
|||
elm_layout_content_set(obj, "elm.swallow.content", scroller);
|
||||
elm_object_focus_allow_set(scroller, EINA_FALSE);
|
||||
pd->scroller = scroller;
|
||||
evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_elm_code_widget_scroller_clicked_cb, obj);
|
||||
|
||||
fontname = edje_object_data_get(elm_layout_edje_get(obj), "font.name");
|
||||
fontsize = edje_object_data_get(elm_layout_edje_get(obj), "font.size");
|
||||
|
|
Loading…
Reference in New Issue