forked from enlightenment/enlightenment
use zone size for un-oriented new gadgets
this is a relative size which I set based on zone size, so avoid the possibility of using unsized site geometry
This commit is contained in:
parent
9eed5f49a8
commit
d216cce6eb
|
@ -894,14 +894,9 @@ _gadget_util_add(E_Gadget_Site *zgs, const char *type, int id)
|
|||
zgc->w = zgc->h = -1;
|
||||
else
|
||||
{
|
||||
int w, h;
|
||||
E_Zone *zone = e_zone_current_get();
|
||||
|
||||
evas_object_geometry_get(zgc->site->layout, NULL, NULL, &w, &h);
|
||||
w = MIN(zone->w, w);
|
||||
h = MIN(zone->h, h);
|
||||
zgc->w = (96 * e_scale) / (double)w;
|
||||
zgc->h = (96 * e_scale) / (double)h;
|
||||
zgc->w = (96 * e_scale) / (double)zone->w;
|
||||
zgc->h = (96 * e_scale) / (double)zone->h;
|
||||
}
|
||||
zgc->site->gadgets = eina_list_append(zgc->site->gadgets, zgc);
|
||||
zgs->gadget_list = eina_inlist_append(zgs->gadget_list, EINA_INLIST_GET(zgc));
|
||||
|
|
Loading…
Reference in New Issue