theme - ibar/ibox label overlay - properly align with text min size

@fix
This commit is contained in:
Carsten Haitzler 2022-01-17 20:56:03 +00:00
parent 6aff4fc3aa
commit 7355d8d2a9
2 changed files with 15 additions and 3 deletions

View File

@ -153,7 +153,7 @@ _cb_worker_message(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED, void *m
if (lig->max > 0)
{
val = ((1000 * lig->val) + 500) / lig->max;
val = (1000 * lig->val) / lig->max;
if (val < 0) val = 0;
else if (val > 1000) val = 1000;
}

View File

@ -1948,10 +1948,22 @@ _ibar_cb_icon_move(void *data, Evas *e, Evas_Object *obj, void *event_info EINA_
if (!zone)
zone = eina_list_data_get(e_comp->zones);
}
if ((ic->ibar->inst->orient == E_GADCON_ORIENT_LEFT) ||
(ic->ibar->inst->orient == E_GADCON_ORIENT_CORNER_LT) ||
(ic->ibar->inst->orient == E_GADCON_ORIENT_CORNER_LB))
sig = "e,origin,left";
else if ((ic->ibar->inst->orient == E_GADCON_ORIENT_RIGHT) ||
(ic->ibar->inst->orient == E_GADCON_ORIENT_CORNER_RT) ||
(ic->ibar->inst->orient == E_GADCON_ORIENT_CORNER_RB))
sig = "e,origin,right";
else
{
if (chx - (len / 2) < zone->x)
sig = "e,origin,left";
else if ((chx + (len / 2) > cw) || ((chx + (len / 2) > zone->x + zone->w)))
sig = "e,origin,right";
}
printf("EMIT: %p %s\n", ic, sig);
_ibar_icon_signal_emit(ic, sig, "e");
}