diff options
author | Marcel Hollerbach <marcel-hollerbach@t-online.de> | 2016-09-01 21:49:31 +0200 |
---|---|---|
committer | Marcel Hollerbach <marcel-hollerbach@t-online.de> | 2016-09-01 22:06:39 +0200 |
commit | 9d3b539e0e25485f795f788e2e9cb22f631a28bd (patch) | |
tree | 235e27305597bfa073ff4619dda793e6a827ffd9 | |
parent | 54d446b05ec1ff2879b568b5d91bd2b7bb31ffb0 (diff) | |
download | enlightenment-devs/bu5hm4n/next.tar.gz |
ibar: try to get a better min sizedevs/bu5hm4n/next
-rw-r--r-- | src/modules/ibar/e_mod_main.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c index d810b3dd70..d6c2a427f1 100644 --- a/src/modules/ibar/e_mod_main.c +++ b/src/modules/ibar/e_mod_main.c @@ -638,12 +638,29 @@ static void _ibar_resize_handle(IBar *b) { IBar_Icon *ic; - Evas_Coord w, h, ww, hh; + Evas_Coord w, h, w2, h2, ww, hh; + 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) + { + ww = b->inst->gcc->max.w; + hh = b->inst->gcc->max.h; + } + else + { + evas_object_geometry_get(b->o_outerbox, NULL, NULL, &ww, &hh); + if (!ww) + ww = 40; + if (!hh) + hh = 40; + } if (elm_box_horizontal_get(b->o_box)) ww = hh; else hh = ww; EINA_INLIST_FOREACH(b->icons, ic) |