bugGNUstep - Bugs: bug #35702, NSPopUpButtonCells are clipped too...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #35702: NSPopUpButtonCells are clipped too short

Submitted by:  Jonathan Gillaspie <jonathanosx>
Submitted on:  Sat 03 Mar 2012 05:33:11 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Eric Wasylishen <ericw>
Open/Closed: Closed

Tue 06 Mar 2012 11:18:54 PM UTC, comment #3:

Thanks Eric, I tested the fix on our interface and now all of our labels that should fit do. And the ones that do not aren't being displayed, so I'm happy with the change.

Jonathan Gillaspie <jonathanosx>
Project Member
Tue 06 Mar 2012 08:50:41 AM UTC, comment #2:

Thanks for the report. From the image it looks like the size of the text is being calculated, used to set the text drawing area, and the rendered text ends up being longer.

I committed r34885 which may help; it won't try to restrict the text drawing area to the calculated size.

If there are still problems, here's a code snippet you can add to the start of the drawTitleForMenuItemCell: method in GSThemeDrawing.m to see the drawing rect that is being calculated.

// Outline the title rect in red

[NSGraphicsContext saveGraphicsState];
[[NSColor redColor] set];
NSFrameRect([cell titleRectForBounds: cellFrame]);
[NSGraphicsContext restoreGraphicsState];

Eric Wasylishen <ericw>
Project MemberIn charge of this item.
Tue 06 Mar 2012 02:32:22 AM UTC, comment #1:

Less pronounced, but this is also a problem on Linux when running Cairo.

(Notice the cropping of the word Cursor and Window).

(file #25273)

Jonathan Gillaspie <jonathanosx>
Project Member
Sat 03 Mar 2012 05:33:11 AM UTC, original submission:

The fix in -r34838 is a welcomed change but it seems to go too far in limiting the drawing on Windows with the WinUXTheme, in some cases not even half of the button width is drawn in.

Please see an attached screen shot of one of our preference panes -- the "Mouse Right Click" button should say "Control" but it only has "Contro".

Revision 34838:

  • Source/NSMenuItemCell.m (-titleRectForBounds:): Keep title rect

inside cell bounds, to prevent drawing text outside of a
NSPopUpButtonCell which has a label that is too long to fit.

Jonathan Gillaspie <jonathanosx>
Project Member

 

Attached Files
file #25250:  Screen Shot 2012-03-02 at 10.26.12 PM.png added by jonathanosx (32KiB - image/png - "Too little control")

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ericw (Posted a comment)
  • -unavailable- added by jonathanosx (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 06 Mar 2012 11:18:54 PM UTCjonathanosxAssigned toNone=>ericw
      Open/ClosedOpen=>Closed
    Tue 06 Mar 2012 11:18:53 PM UTCjonathanosxStatusNone=>Fixed
    Tue 06 Mar 2012 02:32:22 AM UTCjonathanosxAttached File-=>Added Screen Shot 2012-03-05 at 7.30.24 PM.png, #25273
      SummaryNSPopUpButtonCells are clipped too short on WinUXTheme=>NSPopUpButtonCells are clipped too short
    Sat 03 Mar 2012 05:33:11 AM UTCjonathanosxAttached File-=>Added Screen Shot 2012-03-02 at 10.26.12 PM.png, #25250

    Back to the top


    Powered by Savane 3.1-cleanup1