bug-gnustep
[Top][All Lists]
Advanced

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

NSPopUpButton related new patches


From: Serg Stoyan
Subject: NSPopUpButton related new patches
Date: Fri, 24 Jan 2003 18:00:24 +0200

Hello Nicola,

NP> > And some questions left. When last item in NSPopUpButton selected
NP> > all key equivalents disappear from items (but still works).
NP> > Selecting any other item returns them back.
NP> 
NP> Interesting.  A bug. :-)

    I've found what the problem is. Last item in my test menu just 
    wider than others. Position of key equivalent is calculated and 
    is off the menu view. I'll continue to work on this problem.

NP> > Another question is: when item has key equivalent and selected
NP> > (displaying NSPopUpButton image on the right side (i don't know
NP> > how it named) after mouse button up). In OpenStep it isn't. Is it
NP> > responsibility of application or AppKit to remove key equivalent
NP> > while item stays visible?
NP> 
NP> If you are talking about the small icon on the right of the popup
NP> button being drawn over the key equivalent of the currently selected
NP> item(which is not very pretty), I think it's a bug in gnustep-gui.
NP> 
NP> In other words, yes, I think it's definitely
NP> gnustep-gui's responsibility to make sure things are displayed
NP> properly :-) and images are not drawn over key equivalents :-)  it's
NP> a bug we need to fix.

    Now it's fixed (NSMenuItemCell.m.patch). It's also moves code that
    drawing right arrow from drawKeyEquivalentWithFrame: into
    drawImageWithFrame: so key equivalent draws only if no image (right
    arrow in menu or any other like in NSPopUpButton).

    The second(NSMenuView.m.patch) is just removes extra 17 pixels
    between menu item text and key equivalent (or right arrow). Now
    menu looks almost(2 pixels still left :)) like NeXT/OpenStep's menu
    and it saves more screen space remaining handy and usable.

PS: I've got reply from gnu.org and waiting for copyright assignment by
mail. It takes 10-14 days I guess.

-- 
Serg Stoyan

Attachment: NSMenuItemCell.m.patch
Description: Binary data

Attachment: NSMenuView.m.patch
Description: Binary data


reply via email to

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