Don't show more menu if there is only one button in it.

If there is only one item inside more menu and if this item is smaller
than more item, the toolbar wont show the more menu.

By: Otavio Pontes <otavio@profusion.mobi>



SVN revision: 54187
This commit is contained in:
Bruno Dilly 2010-11-05 18:21:01 +00:00
parent caaa5fb709
commit 8a118ee12e
1 changed files with 4 additions and 1 deletions

View File

@ -398,8 +398,11 @@ _resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event
if (wd->shrink_mode == ELM_TOOLBAR_SHRINK_MENU)
{
Evas_Coord iw = 0;
Evas_Coord iw = 0, more_w;
_fix_items_visibility(wd, &iw, vw);
evas_object_geometry_get(wd->more_item->base.view, NULL, NULL, &more_w, NULL);
if (iw - more_w <= vw)
iw -= more_w;
/* All items are removed from the box object, since removing individual
* items won't trigger a resize. Items are be readded below. */