bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=01bf9a34d667466417b807a1187b2bc4ba6fa87f
commit 01bf9a34d667466417b807a1187b2bc4ba6fa87f Author: Marcel Hollerbach <m...@marcel-hollerbach.de> Date: Thu Nov 7 21:45:02 2019 +0100 elm_entry: fix wrong displayed scrollbars the scrolbars have been displayed wrongly before. Reason for this is that the theme displays the bars per default, the code however works with hidden by default. This was worked arround before with the fact that we are explicitly hiding the vbar/hbar before. The reason this previous code was not working proberly is that entry decided to retheme a object that was already set to the interface scrollable object. Which means, it was not detected by the code. With the newly introduced reset function you can tell the interface, that you have changed the group, signals will be emitted accordingly. Reviewed-by: Cedric BAIL <cedric.b...@free.fr> Differential Revision: https://phab.enlightenment.org/D10622 --- src/lib/elementary/elm_entry.c | 1 + src/lib/elementary/elm_interface_scrollable.c | 20 ++++++++++++++++---- src/lib/elementary/elm_interface_scrollable.eo | 3 +++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 4cbf725cfb..737be8141b 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -1003,6 +1003,7 @@ _elm_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd) elm_widget_theme_object_set (obj, sd->scr_edje, "scroller", "entry", style); + elm_interface_scrollable_reset_signals(obj); _elm_entry_background_switch(sd->entry_edje, sd->scr_edje); str = edje_object_data_get(sd->scr_edje, "focus_highlight"); diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index 8a2c390f9f..7130efbd94 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -4027,6 +4027,21 @@ _scroll_event_object_detach(Evas_Object *obj) _elm_scroll_mouse_move_event_cb, sid); } +EOLIAN static void +_elm_interface_scrollable_reset_signals(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid) +{ + sid->go_up = sid->go_down = sid->go_right = sid->go_left = EINA_FALSE; + + edje_object_signal_emit(sid->edje_obj, "elm,action,hide,up", "elm"); + edje_object_signal_emit(sid->edje_obj, "elm,action,hide,down", "elm"); + edje_object_signal_emit(sid->edje_obj, "elm,action,hide,right", "elm"); + edje_object_signal_emit(sid->edje_obj, "elm,action,hide,left", "elm"); + edje_object_signal_emit(sid->edje_obj, "elm,action,hide,vbar", "elm"); + edje_object_signal_emit(sid->edje_obj, "elm,action,hide,hbar", "elm"); + + _elm_scroll_scroll_bar_visibility_adjust(sid); +} + EOLIAN static void _elm_interface_scrollable_objects_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Object *edje_object, Evas_Object *hit_rectangle) { @@ -4039,10 +4054,7 @@ _elm_interface_scrollable_objects_set(Eo *obj, Elm_Scrollable_Smart_Interface_Da sid->edje_obj = edje_object; - edje_object_signal_emit(sid->edje_obj, "elm,action,hide,up", "elm"); - edje_object_signal_emit(sid->edje_obj, "elm,action,hide,down", "elm"); - edje_object_signal_emit(sid->edje_obj, "elm,action,hide,right", "elm"); - edje_object_signal_emit(sid->edje_obj, "elm,action,hide,left", "elm"); + elm_interface_scrollable_reset_signals(obj); if (sid->event_rect) _scroll_event_object_detach(obj); diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index cec1536c10..2c911b8091 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -647,6 +647,9 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Focus enable: bool; [[True to enable looping.]] } } + reset_signals { + [[Call this if you have changed the group of the object passed to @.objects]] + } } implements { class.constructor; --