summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-07 21:45:02 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-07 22:24:11 +0100
commit01bf9a34d667466417b807a1187b2bc4ba6fa87f (patch)
tree1acc0d20917370c0b256174fb54347d035c32eb3 /src
parent1f66d9ed9b6eb5df09f66230e364197ccead00f5 (diff)
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.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10622
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_entry.c1
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c20
-rw-r--r--src/lib/elementary/elm_interface_scrollable.eo3
3 files changed, 20 insertions, 4 deletions
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 4cbf725..737be81 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)
1003 elm_widget_theme_object_set 1003 elm_widget_theme_object_set
1004 (obj, sd->scr_edje, "scroller", "entry", style); 1004 (obj, sd->scr_edje, "scroller", "entry", style);
1005 1005
1006 elm_interface_scrollable_reset_signals(obj);
1006 _elm_entry_background_switch(sd->entry_edje, sd->scr_edje); 1007 _elm_entry_background_switch(sd->entry_edje, sd->scr_edje);
1007 1008
1008 str = edje_object_data_get(sd->scr_edje, "focus_highlight"); 1009 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 8a2c390..7130efb 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -4028,6 +4028,21 @@ _scroll_event_object_detach(Evas_Object *obj)
4028} 4028}
4029 4029
4030EOLIAN static void 4030EOLIAN static void
4031_elm_interface_scrollable_reset_signals(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid)
4032{
4033 sid->go_up = sid->go_down = sid->go_right = sid->go_left = EINA_FALSE;
4034
4035 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,up", "elm");
4036 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,down", "elm");
4037 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,right", "elm");
4038 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,left", "elm");
4039 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,vbar", "elm");
4040 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,hbar", "elm");
4041
4042 _elm_scroll_scroll_bar_visibility_adjust(sid);
4043}
4044
4045EOLIAN static void
4031_elm_interface_scrollable_objects_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Object *edje_object, Evas_Object *hit_rectangle) 4046_elm_interface_scrollable_objects_set(Eo *obj, Elm_Scrollable_Smart_Interface_Data *sid, Evas_Object *edje_object, Evas_Object *hit_rectangle)
4032{ 4047{
4033 Evas_Coord mw, mh; 4048 Evas_Coord mw, mh;
@@ -4039,10 +4054,7 @@ _elm_interface_scrollable_objects_set(Eo *obj, Elm_Scrollable_Smart_Interface_Da
4039 4054
4040 sid->edje_obj = edje_object; 4055 sid->edje_obj = edje_object;
4041 4056
4042 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,up", "elm"); 4057 elm_interface_scrollable_reset_signals(obj);
4043 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,down", "elm");
4044 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,right", "elm");
4045 edje_object_signal_emit(sid->edje_obj, "elm,action,hide,left", "elm");
4046 4058
4047 if (sid->event_rect) 4059 if (sid->event_rect)
4048 _scroll_event_object_detach(obj); 4060 _scroll_event_object_detach(obj);
diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo
index cec1536..2c911b8 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
647 enable: bool; [[True to enable looping.]] 647 enable: bool; [[True to enable looping.]]
648 } 648 }
649 } 649 }
650 reset_signals {
651 [[Call this if you have changed the group of the object passed to @.objects]]
652 }
650 } 653 }
651 implements { 654 implements {
652 class.constructor; 655 class.constructor;