On Fri, 28 Dec 2012 19:20:53 +0000 Michael Blumenkrantz
<michael.blumenkra...@gmail.com> said:

> On Thu, 27 Dec 2012 19:28:25 -0800
> "Enlightenment SVN" <no-re...@enlightenment.org> wrote:
> 
> > Log:
> > allow for primary toplevel menus > screen height (or width) and
> >   autoscroll them correctly. also raise the limits for menu sizes up to
> >   30k or 2x zone height for menu item cutoff...
> >   
> >   
> > 
> > Author:       raster
> > Date:         2012-12-27 19:28:25 -0800 (Thu, 27 Dec 2012)
> > New Revision: 81778
> > Trac:         http://trac.enlightenment.org/e/changeset/81778
> > 
> > Modified:
> >   trunk/e/src/bin/e_menu.c 
> > 
> > Modified: trunk/e/src/bin/e_menu.c
> > ===================================================================
> > --- trunk/e/src/bin/e_menu.c        2012-12-28 03:24:07 UTC (rev 81777)
> > +++ trunk/e/src/bin/e_menu.c        2012-12-28 03:28:25 UTC (rev 81778)
> > @@ -1152,10 +1152,16 @@
> >                         int x, y, w, h;
> >  
> >                         e_zone_useful_geometry_get(m->zone, &x, &y, &w, &h);
> > -                       if ((m->cur.x + m->cur.w) > (x + w))
> > -                         m->cur.x = x + w - m->cur.w;
> > -                       if ((m->cur.y + m->cur.h) > (y + h))
> > -                         m->cur.y = y + h - m->cur.h;
> > +                       if (m->cur.w <= w)
> > +                         {
> > +                            if ((m->cur.x + m->cur.w) > (x + w))
> > +                              m->cur.x = x + w - m->cur.w;
> > +                         }
> > +                       if (m->cur.h <= h)
> > +                         {
> > +                            if ((m->cur.y + m->cur.h) > (y + h))
> > +                              m->cur.y = y + h - m->cur.h;
> > +                         }
> >                      }
> >                    m->prev.x = m->cur.x;
> >                    m->prev.y = m->cur.y;
> > @@ -1796,7 +1802,7 @@
> >     int min_submenu_w = 0, min_submenu_h = 0;
> >     int min_toggle_w = 0, min_toggle_h = 0;
> >     int min_w = 0, min_h = 0;
> > -   int zh = 0, ms = 0;
> > +   int zh = 0, ms = 0, maxh = 0;
> >     unsigned int cur_items = 0, max_items = -1;
> >  
> >     e_box_freeze(m->container_object);
> > @@ -1867,11 +1873,14 @@
> >     if (min_h * eina_list_count(m->items) >= (unsigned int)m->zone->h)
> >       {
> >          e_zone_useful_geometry_get(m->zone, NULL, NULL, NULL, &zh);
> > -        max_items = zh / min_h - 1;
> > +        maxh = zh * 2;
> > +        if (maxh > 30000) maxh = 30000; // 32k x 32k mx coord limit for
> > wins
> > +        max_items = (maxh / min_h) - 1;
> >       }
> >     EINA_LIST_FOREACH(m->items, l, mi)
> >       {
> > -        if ((cur_items >= max_items) || (zh && ((ms + (2 * mh) >= zh) ||
> > (ms + (2 * mi->separator_h) >= zh))))
> > +        if ((cur_items >= max_items) ||
> > +            (maxh && ((ms + (2 * mh) >= maxh) || (ms + (2 *
> > mi->separator_h) >= maxh)))) {
> >               _e_menu_item_unrealize(mi);
> >               continue;
> > 
> > 
> 
> 
> fyi this commit 100% breaks the "Move to" menu for me. I'll be reverting it
> in a day or two if it isn't fixed

then you're back to broken menus if item count exceeds screen height (which
wasnt broken in original menu code i wrote). i'm staring at a move-to
menu/submenu thats displaying just fine. if it displays offscreen to the right
it scrolls in when u mouse to the edge as the menu scroll code intends.

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to