FROM : James Bucanek
DATE : Wed Aug 02 20:36:39 2006
Greetings,
I've created a reasonable facsimile of the recent items menu using attributed strings. However, the "real" menu managed by NSDocumentController draws the icon images vertically centered with the names of the documents in each menu item cell.
When I create my attributed string, the icons (NSImages inserted as file attachments) get drawn on the baseline and are too high (the top two pixels get cut off). I tried adding a negative NSBaselineOffsetAttribute but it seems to be ignored. Note that a positive offset works as advertised, but I can't seem to get the NSImage to draw below the baseline.
Any ideas?
DATE : Wed Aug 02 20:36:39 2006
Greetings,
I've created a reasonable facsimile of the recent items menu using attributed strings. However, the "real" menu managed by NSDocumentController draws the icon images vertically centered with the names of the documents in each menu item cell.
When I create my attributed string, the icons (NSImages inserted as file attachments) get drawn on the baseline and are too high (the top two pixels get cut off). I tried adding a negative NSBaselineOffsetAttribute but it seems to be ignored. Note that a positive offset works as advertised, but I can't seem to get the NSImage to draw below the baseline.
Any ideas?
| Related mails | Author | Date |
|---|---|---|
| James Bucanek | Aug 2, 20:36 | |
| James Bucanek | Aug 3, 00:02 |






Cocoa mail archive

