bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=50030dc69346c209109c36bb41631b176c85b2c5
commit 50030dc69346c209109c36bb41631b176c85b2c5 Author: Marcel Hollerbach <marcel-hollerb...@t-online.de> Date: Thu Sep 1 21:49:31 2016 +0200 ibar: try to get a better min size There are two cases, on a shelf and on the desktop. If on a shelf we are using the height setting of the self, since max.w max.h are only set after a few calcuations, and the gadget does not get moved on a shelf which does not fade out, so the first min size calculation must be correct. If we are on the desktop max.w and max.h are not always 0. There were some cases when none of this conditions are met. So this patch enforces a mimum size of 40x40 pixels. --- src/modules/ibar/e_mod_main.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c index d810b3d..1cce3a8 100644 --- a/src/modules/ibar/e_mod_main.c +++ b/src/modules/ibar/e_mod_main.c @@ -638,12 +638,28 @@ static void _ibar_resize_handle(IBar *b) { IBar_Icon *ic; - Evas_Coord w, h, ww, hh; + Evas_Coord w, h, w2, h2, ww = 0, hh = 0; + int max_w, max_h; if (!b->inst->gcc) return; - evas_object_geometry_get(b->o_outerbox, NULL, NULL, &ww, &hh); - if (b->inst->gcc->max.w) ww = MIN(ww, b->inst->gcc->max.w); - if (b->inst->gcc->max.h) hh = MIN(hh, b->inst->gcc->max.h); + + if (b->inst->gcc->gadcon->shelf) + { + /* we are in a shelf */ + ww = hh = b->inst->gcc->gadcon->shelf->cfg->size; + } + else if (b->inst->gcc->max.w || b->inst->gcc->max.h) + { + evas_object_geometry_get(b->o_outerbox, NULL, NULL, &ww, &hh); + ww = MIN(b->inst->gcc->max.w, ww); + hh = MIN(b->inst->gcc->max.h, hh); + } + + /* Fallback to a size for the case noone gives a max size and no shelf config is there */ + if (ww == 0) ww = 40; + if (hh == 0) hh = 40; + + if (elm_box_horizontal_get(b->o_box)) ww = hh; else hh = ww; EINA_INLIST_FOREACH(b->icons, ic) --