summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2015-05-06 14:14:33 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2015-05-06 14:34:32 +0200
commit64a4cf4c6847936f5074ad94bf9a8f2283609c3b (patch)
tree67e6bba26dff94684cb21cfe3dee63b3697f5c83
parentfdb7147872f9f6f97c7ea2a179be3d92e0c6cb99 (diff)
fileselector: Work around initial genlist size bug for release.
Jupp, its a dirty hack but it helps to work around the problem for now and get the release out. I will revert it in master after the release and we keep the bug open until this is fixed and hopefully backported. ref T2367
-rw-r--r--src/lib/elc_fileselector.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 1ea2c01b9..45a88dcb0 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -1236,6 +1236,24 @@ _files_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
1236 } 1236 }
1237} 1237}
1238 1238
1239/* FIXME: This is a dirty hack to avoid a broken layout on fileselector come up.
1240 * In some cases on some systems the genlist file view comes up with a height of
1241 * 10 and only resizes when interacted manually. This only papers over it for the
1242 * 1.14 release and will be removed from master directly afterwards. If we find
1243 * a solution we are able to backport this will also go away from the efl-1.14
1244 * stable branch. See T2367 for the full details.
1245 */
1246static void
1247_files_on_resize(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o, void *event EINA_UNUSED)
1248{
1249 Evas_Coord x, y, w, h;
1250
1251 evas_object_geometry_get(o, &x, &y, &w, &h);
1252
1253 if (h < 20)
1254 evas_object_resize(o, 394, 279);
1255}
1256
1239static Evas_Object * 1257static Evas_Object *
1240_files_list_add(Evas_Object *obj) 1258_files_list_add(Evas_Object *obj)
1241{ 1259{
@@ -1258,6 +1276,7 @@ _files_list_add(Evas_Object *obj)
1258 evas_object_smart_callback_add(li, "expanded", _on_list_expanded, obj); 1276 evas_object_smart_callback_add(li, "expanded", _on_list_expanded, obj);
1259 evas_object_smart_callback_add(li, "contracted", _on_list_contracted, obj); 1277 evas_object_smart_callback_add(li, "contracted", _on_list_contracted, obj);
1260 evas_object_event_callback_add(li, EVAS_CALLBACK_KEY_DOWN, _files_key_down, obj); 1278 evas_object_event_callback_add(li, EVAS_CALLBACK_KEY_DOWN, _files_key_down, obj);
1279 evas_object_event_callback_add(li, EVAS_CALLBACK_RESIZE, _files_on_resize, obj);
1261 1280
1262 elm_widget_sub_object_add(obj, li); 1281 elm_widget_sub_object_add(obj, li);
1263 1282