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

@fix
pull/1/head
Carsten Haitzler 9 months ago
parent 6ad07d07c2
commit f615a2120d
  1. 2
      src/bin/system/e_system_backlight.c
  2. 16
      src/modules/ibar/e_mod_main.c

@ -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;
}

@ -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 (chx - (len / 2) < zone->x)
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 ((chx + (len / 2) > cw) || ((chx + (len / 2) > zone->x + zone->w)))
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");
}

Loading…
Cancel
Save