forked from enlightenment/enlightenment
improve time gadget screen positioning
This commit is contained in:
parent
885d24eeab
commit
dbb63f890d
|
@ -342,7 +342,7 @@ static Evas_Object *
|
|||
_clock_gadget_configure(Evas_Object *g)
|
||||
{
|
||||
Instance *inst = evas_object_data_get(g, "clock");
|
||||
return config_clock(inst->cfg);
|
||||
return config_clock(inst->cfg, e_comp_object_util_zone_get(g));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -466,7 +466,7 @@ clock_wizard(E_Gadget_Wizard_End_Cb cb, void *data, Eina_Bool digital)
|
|||
|
||||
ci = _conf_item_get(&id, digital);
|
||||
wi->id = ci->id;
|
||||
evas_object_event_callback_add(config_clock(ci), EVAS_CALLBACK_DEL, _wizard_end, wi);
|
||||
evas_object_event_callback_add(config_clock(ci, NULL), EVAS_CALLBACK_DEL, _wizard_end, wi);
|
||||
}
|
||||
|
||||
EINTERN void
|
||||
|
|
|
@ -68,7 +68,7 @@ struct _Instance
|
|||
Config_Item *cfg;
|
||||
};
|
||||
|
||||
EINTERN Evas_Object *config_clock(Config_Item *);
|
||||
EINTERN Evas_Object *config_clock(Config_Item *, E_Zone*);
|
||||
EINTERN void config_timezone_populate(Evas_Object *obj, const char *name);
|
||||
void clock_instances_redo(void);
|
||||
|
||||
|
|
|
@ -423,13 +423,14 @@ _config_advanced_changed(void *data, Evas_Object *obj, void *event_info EINA_UNU
|
|||
}
|
||||
|
||||
EINTERN Evas_Object *
|
||||
config_clock(Config_Item *ci)
|
||||
config_clock(Config_Item *ci, E_Zone *zone)
|
||||
{
|
||||
Evas_Object *popup, *tb, *o, *bx;
|
||||
int i, row = 0;
|
||||
char daynames[7][64];
|
||||
struct tm tm;
|
||||
|
||||
if (!zone) zone = e_zone_current_get();
|
||||
memset(&tm, 0, sizeof(struct tm));
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
|
@ -559,7 +560,8 @@ config_clock(Config_Item *ci)
|
|||
|
||||
popup = e_comp_object_util_add(popup, E_COMP_OBJECT_TYPE_NONE);
|
||||
evas_object_layer_set(popup, E_LAYER_POPUP);
|
||||
evas_object_resize(popup, e_zone_current_get()->w / 4, e_zone_current_get()->h / 3);
|
||||
evas_object_move(popup, zone->x, zone->y);
|
||||
evas_object_resize(popup, zone->w / 4, zone->h / 3);
|
||||
e_comp_object_util_center(popup);
|
||||
evas_object_show(popup);
|
||||
e_comp_object_util_autoclose(popup, NULL, e_comp_object_util_autoclose_on_escape, NULL);
|
||||
|
|
Loading…
Reference in New Issue