Revision: 5063
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5063&view=rev
Author:   hofman
Date:     2008-12-15 16:24:03 +0000 (Mon, 15 Dec 2008)

Log Message:
-----------
integral window sizes for navigation window tool tip

Modified Paths:
--------------
    trunk/SKNavigationWindow.m

Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m  2008-12-15 12:56:05 UTC (rev 5062)
+++ trunk/SKNavigationWindow.m  2008-12-15 16:24:03 UTC (rev 5063)
@@ -226,7 +226,7 @@
     NSRect newFrame = [self frameRectForContentRect:[toolTipView frame]];
     NSRect viewRect = [view convertRect:[view bounds] toView:nil];
     viewRect.origin = [[view window] convertBaseToScreen:viewRect.origin];
-    newFrame.origin = NSMakePoint(NSMidX(viewRect) - 0.5 * NSWidth(newFrame), 
NSMaxY(viewRect) + LABEL_OFFSET);
+    newFrame.origin = NSMakePoint(ceilf(NSMidX(viewRect) - 0.5 * 
NSWidth(newFrame)), NSMaxY(viewRect) + LABEL_OFFSET);
     [self setFrame:newFrame display:YES];
     [self setLevel:[[view window] level]];
     if ([self parentWindow] != [view window])
@@ -298,7 +298,7 @@
 
 - (void)sizeToFit {
     NSSize size = [[self attributedStringValue] size];
-    size.width += 2 * LABEL_TEXT_MARGIN;
+    size.width = ceilf(size.width + 2 * LABEL_TEXT_MARGIN);
     size.height += 2 * LABEL_TEXT_MARGIN;
     [self setFrameSize:size];
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to