* Source/NSSplitView.m (adjustSubviews): Use centerScanRect to

give subviews pixel-aligned frames.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35199 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ericwa 2012-06-13 06:30:42 +00:00
parent ce2ec4de3b
commit 6ac3c0ccc9
2 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2012-06-13 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSSplitView.m (adjustSubviews): Use centerScanRect to
give subviews pixel-aligned frames.
2012-06-07 German A. Arias <german@xelalug.org> 2012-06-07 German A. Arias <german@xelalug.org>
* Source/GSToolTips.m (_timedOut:): Use the font size specified * Source/GSToolTips.m (_timedOut:): Use the font size specified

View file

@ -786,8 +786,6 @@ static NSNotificationCenter *nc = nil;
NSArray *subs = [self subviews]; NSArray *subs = [self subviews];
unsigned count = [subs count]; unsigned count = [subs count];
NSView *views[count]; NSView *views[count];
NSSize newSize;
NSPoint newPoint;
unsigned i; unsigned i;
BOOL autoloading = NO; BOOL autoloading = NO;
double proportionsTotal = 1.0; double proportionsTotal = 1.0;
@ -901,6 +899,7 @@ static NSNotificationCenter *nc = nil;
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
NSRect newRect;
float newHeight; float newHeight;
if (i < (count - 1)) if (i < (count - 1))
@ -920,10 +919,10 @@ static NSNotificationCenter *nc = nil;
* space. */ * space. */
newHeight = NSHeight(_bounds) - running; newHeight = NSHeight(_bounds) - running;
} }
newSize = NSMakeSize(NSWidth(_bounds), newHeight); newRect = NSMakeRect(0.0, running, NSWidth(_bounds), newHeight);
newPoint = NSMakePoint(0.0, running); newRect = [self centerScanRect: newRect];
running += newHeight + _dividerWidth; running += newHeight + _dividerWidth;
[views[i] setFrame: NSMakeRect(newPoint.x, newPoint.y, newSize.width, newSize.height)]; [views[i] setFrame: newRect];
} }
} }
else else
@ -933,6 +932,7 @@ static NSNotificationCenter *nc = nil;
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
NSRect newRect;
float newWidth; float newWidth;
if (i < (count - 1)) if (i < (count - 1))
@ -950,10 +950,10 @@ static NSNotificationCenter *nc = nil;
{ {
newWidth = NSWidth(_bounds) - running; newWidth = NSWidth(_bounds) - running;
} }
newSize = NSMakeSize(newWidth, NSHeight(_bounds)); newRect = NSMakeRect(running, 0.0, newWidth, NSHeight(_bounds));
newPoint = NSMakePoint(running, 0.0); newRect = [self centerScanRect: newRect];
running += newWidth + _dividerWidth; running += newWidth + _dividerWidth;
[views[i] setFrame: NSMakeRect(newPoint.x, newPoint.y, newSize.width, newSize.height)]; [views[i] setFrame: newRect];
} }
} }