adium-1.4 2573:4c8b116ca530: Correct the tendancy of the charact...
commits at adium.im
commits at adium.im
Wed Aug 12 02:38:54 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/4c8b116ca530
revision: 2573:4c8b116ca530
author: Stephen Holt <sholt at adium.im>
date: Tue Aug 11 11:14:29 2009 -0400
Correct the tendancy of the character counter to shift positions/shrink when the message window is resized. Fixes #11898.
diffs (19 lines):
diff -r 0125c66cb28b -r 4c8b116ca530 Frameworks/Adium Framework/Source/AIMessageEntryTextView.m
--- a/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Tue Aug 11 22:32:51 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Tue Aug 11 11:14:29 2009 -0400
@@ -1120,11 +1120,12 @@
- (void)positionCharacterCounter
{
NSRect visRect = [[self superview] bounds];
- NSRect counterRect = [characterCounter frame];
+ NSSize counterSize = characterCounter.string.size;
//NSMaxY([self frame]) is necessary because visRect's height changes after you start typing. No idea why.
- [characterCounter setFrameOrigin:NSMakePoint(NSMaxX(visRect) - NSWidth(counterRect) - INDICATOR_RIGHT_PADDING,
- NSMidY([self frame]) - NSHeight(counterRect)/2)];
+ [characterCounter setFrameOrigin:NSMakePoint(NSMaxX(visRect) - counterSize.width - INDICATOR_RIGHT_PADDING,
+ NSMidY([self frame]) - (counterSize.height)/2)];
+ [characterCounter setFrameSize:counterSize];
[[self enclosingScrollView] setNeedsDisplay:YES];
}
More information about the commits
mailing list