forked from enlightenment/enlightenment
Gadgets: Clamp aspect sets to a minimum of width and height minimum of 1.
This fixes T5600
This commit is contained in:
parent
202bf770f4
commit
9894726039
|
@ -224,6 +224,8 @@ _backlight_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS
|
|||
Instance *inst = data;
|
||||
|
||||
edje_object_parts_extends_calc(elm_layout_edje_get(inst->o_backlight), 0, 0, &w, &h);
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||
}
|
||||
|
||||
|
|
|
@ -593,6 +593,8 @@ _mixer_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
Instance *inst = data;
|
||||
|
||||
edje_object_parts_extends_calc(elm_layout_edje_get(inst->o_mixer), 0, 0, &w, &h);
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||
}
|
||||
|
||||
|
|
|
@ -517,6 +517,8 @@ _batman_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
Instance *inst = data;
|
||||
|
||||
edje_object_parts_extends_calc(elm_layout_edje_get(inst->cfg->batman.o_gadget), 0, 0, &w, &h);
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
if (inst->cfg->esm == E_SYSINFO_MODULE_BATMAN)
|
||||
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||
else
|
||||
|
|
|
@ -689,6 +689,8 @@ _cpuclock_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSE
|
|||
Instance *inst = data;
|
||||
|
||||
edje_object_parts_extends_calc(elm_layout_edje_get(inst->cfg->cpuclock.o_gadget), 0, 0, &w, &h);
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
if (inst->cfg->esm == E_SYSINFO_MODULE_CPUCLOCK)
|
||||
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||
else
|
||||
|
|
|
@ -147,6 +147,8 @@ _cpumonitor_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *e
|
|||
w *= num_cores;
|
||||
h = sh;
|
||||
}
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
if (inst->cfg->esm == E_SYSINFO_MODULE_CPUMONITOR)
|
||||
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||
else
|
||||
|
|
|
@ -260,6 +260,8 @@ _memusage_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSE
|
|||
|
||||
edje_object_parts_extends_calc(elm_layout_edje_get(inst->cfg->memusage.o_gadget),
|
||||
0, 0, &w, &h);
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
if (inst->cfg->esm == E_SYSINFO_MODULE_MEMUSAGE)
|
||||
evas_object_size_hint_aspect_set(inst->o_main,
|
||||
EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||
|
|
|
@ -115,6 +115,8 @@ _netstatus_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS
|
|||
Instance *inst = data;
|
||||
|
||||
edje_object_parts_extends_calc(elm_layout_edje_get(inst->cfg->netstatus.o_gadget), 0, 0, &w, &h);
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
if (inst->cfg->esm == E_SYSINFO_MODULE_NETSTATUS)
|
||||
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||
else
|
||||
|
|
|
@ -190,6 +190,8 @@ _thermal_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED
|
|||
Instance *inst = data;
|
||||
|
||||
edje_object_parts_extends_calc(elm_layout_edje_get(inst->cfg->thermal.o_gadget), 0, 0, &w, &h);
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
if (inst->cfg->esm == E_SYSINFO_MODULE_THERMAL)
|
||||
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue