[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GSSimpleLayoutManager.m and NSTextView.m patches
From: |
Nicola Pero |
Subject: |
Re: GSSimpleLayoutManager.m and NSTextView.m patches |
Date: |
Mon, 24 Jun 2002 13:26:15 +0100 (BST) |
> Hi, everybody!
>
> Here is a patch for boundingRectForGlyphRange:inTextContainer: and
> lineFragmentRectForGlyphAtIndex:effectiveRange: to return
> system font bounding rect height instead of hardcoded "12" when no text in
> glyph range or line fragment(empty NSTextField or NSTextView). Also removes
> useless code in NSTextView.
Thanks - good patch - I made some changes to it before applying it - I
used userFontOfSize: rather than systemFontOfSize:, I let NSFont choose
the right font automatically, I turned the lookup of the font height a
static inline function, and I applied the change to many more places in
GSSimpleLayoutManager ... there should be no '12' hardcoded left.
> PS: With this patches NSTextField works as expected (inserttion point has
> correct height). NSTextView's insertion point seems to be 12 points height
> though. Any suggestions? As i understand NSTextField's and NSTextView's edit
> control the same. Where am i wrong?
It seems to work for me now (with my changes).
Please let me know if you have any problems.
Thanks for contributing!