summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen 'Okra' Houston <smhouston88@gmail.com>2017-01-06 17:31:47 -0600
committerStephen 'Okra' Houston <smhouston88@gmail.com>2017-01-06 17:31:47 -0600
commitb24ab5c06d30c610cc916ad9e05c892dacda2e33 (patch)
tree550bc31f20eb0c590a87350e8cc8a20cad15d676 /src
parent924307d96e357ba5b82e45216bf56ed3ddd1c331 (diff)
downloadenlightenment-b24ab5c06d30c610cc916ad9e05c892dacda2e33.tar.gz
Enlightenment: Add a scroller to the sysinfo gadget.
Diffstat (limited to 'src')
-rw-r--r--src/modules/sysinfo/sysinfo.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/modules/sysinfo/sysinfo.c b/src/modules/sysinfo/sysinfo.c
index 4da8a392c6..83bd8df2b9 100644
--- a/src/modules/sysinfo/sysinfo.c
+++ b/src/modules/sysinfo/sysinfo.c
@@ -36,9 +36,6 @@ _sysinfo_created_cb(void *data, Evas_Object *obj, void *event_data EINA_UNUSED)
inst->cfg->sysinfo.o_netstatus = sysinfo_netstatus_create(inst->o_main, inst);
elm_table_pack(inst->o_main, inst->cfg->sysinfo.o_netstatus, 1, 2, 1, 1);
- E_EXPAND(inst->o_main);
- E_FILL(inst->o_main);
-
evas_object_smart_callback_del_full(obj, "gadget_created", _sysinfo_created_cb, data);
}
@@ -107,23 +104,33 @@ Evas_Object *
sysinfo_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient EINA_UNUSED)
{
Instance *inst;
+ Evas_Object *scroller;
inst = E_NEW(Instance, 1);
inst->cfg = _conf_item_get(id);
*id = inst->cfg->id;
+
+ scroller = elm_scroller_add(parent);
+ elm_object_style_set(scroller, "no_inset_shadow");
+ E_EXPAND(scroller);
+ evas_object_size_hint_aspect_set(scroller, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
+ evas_object_show(scroller);
+
inst->o_main = elm_table_add(parent);
elm_table_homogeneous_set(inst->o_main, EINA_TRUE);
E_EXPAND(inst->o_main);
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
+ elm_object_content_set(scroller, inst->o_main);
+ evas_object_show(inst->o_main);
+
evas_object_smart_callback_add(parent, "gadget_created", _sysinfo_created_cb, inst);
evas_object_smart_callback_add(parent, "gadget_removed", _sysinfo_removed_cb, inst);
- evas_object_show(inst->o_main);
- if (inst->cfg->id < 0) return inst->o_main;
+ if (inst->cfg->id < 0) return scroller;
sysinfo_instances =
eina_list_append(sysinfo_instances, inst);
- return inst->o_main;
+ return scroller;
}