Revision: 3190 http://skim-app.svn.sourceforge.net/skim-app/?rev=3190&view=rev Author: hofman Date: 2007-11-10 06:05:36 -0800 (Sat, 10 Nov 2007)
Log Message: ----------- Revert last commit and correct the method instead. Modified Paths: -------------- trunk/BDSKEdgeView.m Modified: trunk/BDSKEdgeView.m =================================================================== --- trunk/BDSKEdgeView.m 2007-11-10 13:57:12 UTC (rev 3189) +++ trunk/BDSKEdgeView.m 2007-11-10 14:05:36 UTC (rev 3190) @@ -144,4 +144,36 @@ return rect; } +- (void)adjustSubviews { + NSEnumerator *viewEnum = [[contentView subviews] objectEnumerator]; + NSView *view; + NSRect contentRect; + NSRect frame; + + [contentView setFrame:[self contentRect]]; + contentRect = [contentView bounds]; + + while (view = [viewEnum nextObject]) { + frame = [view frame]; + if (NSContainsRect(contentRect, frame)) + continue; + if (NSMinX(frame) > NSMaxX(contentRect)) { + frame.origin.x = NSMaxX(contentRect); + frame.size.width = 0.0; + } else if (NSMaxX(frame) < NSMinX(contentRect)) { + frame.origin.x = NSMinX(contentRect); + frame.size.width = 0.0; + } + if (NSMinY(frame) > NSMaxY(contentRect)) { + frame.origin.y = NSMaxY(contentRect); + frame.size.height = 0.0; + } else if (NSMaxY(frame) < NSMinY(contentRect)) { + frame.origin.y = NSMinY(contentRect); + frame.size.height = 0.0; + } + frame = NSIntersectionRect(frame, contentRect); + [view setFrame:frame]; + } +} + @end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit