bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuView and popups (was: Re: [PATCH] Menus in lowerleft corner)


From: Willem Rein Oudshoorn
Subject: Re: NSMenuView and popups (was: Re: [PATCH] Menus in lowerleft corner)
Date: 14 Mar 2003 08:29:40 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Michael Hanni <michael@deviant-behavior.com> writes:

> Hi Willem,
> 
> --- Willem Rein Oudshoorn <woudshoo@xs4all.nl> wrote:
> >
> > Testing
> > -------
> > 
> > Could someone who experiences these problems test out this 
> > patch and let me know the result?
> 
> This patch works like a dream... Very nice work.

Glad to hear.
> 
> In testing this I came across a small issue in the popup buttons which was the
> result not of this patch but your previous NSMenuView work. It seems that even
> popupbuttons have an NSMenuViewWindowTitle (off the top of my head I can't
> remember the name) assigned to them... Thus, if you manipulate a popup like 
> the
> several in GWorkspace you get some weird behavior. If the popup needs more 
> than
> a split second to complete its action you get a weird size/resize shuffle with
> a titlebar.

Yes, I just noticed it yesterday.  It also quite easy to see this in Gorm
when you try to edit a NSPopupMenu.

> Since the NSMenuViewWindowTitleBar-thingie is created in NSMenuView's
> initWithFrame, and the NSMenu creating the NSMenuView doesn't know its owned 
> by
> a popup until right after its init, we are slightly screwed. I suppose we 
> could
> catch this on the first sizeToFit in NSMenuView -- like we catch the left
> offset?

Yes, that would be an option.  Although I would prefer to split the 
NSMenuView class into two:  GSPopupMenuView and GSMenuView.
But your suggestion is easier and Fred Kiefer might object
to the split.

> Oh, one other thing... the "filesystem depth" popup in GWorkspace windows
> should really sizeToFit after it changes its title -- i.e. you get a long
> directory name that goes right out the side. Does sizeToFit in NSPopUpButton
> work still (there were some issues with the _cellSize not getting set properly
> I think)?

>From the top of my head, I think NSPopUpButtons derive their cell size from
the button and I do not think that sizeToFit: will be called on a button.

Imagine:

   Label: NSPopupButton Text

and if suddenly the NSPopupButton resizes it will messes up the layout.
However, we could make it so that the popup menu will adjust its width
to the content.  Does anyone know how MacOSX handles this?

Wim Oudshoorn.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]