Revision: 6943
http://skim-app.svn.sourceforge.net/skim-app/?rev=6943&view=rev
Author: hofman
Date: 2010-12-07 22:18:34 +0000 (Tue, 07 Dec 2010)
Log Message:
-----------
use NSWindow method to constrain window frame to screen
Modified Paths:
--------------
trunk/SKImageToolTipWindow.m
trunk/SKMainWindowController_Actions.m
trunk/SKSnapshotWindowController.m
Modified: trunk/SKImageToolTipWindow.m
===================================================================
--- trunk/SKImageToolTipWindow.m 2010-12-07 15:45:06 UTC (rev 6942)
+++ trunk/SKImageToolTipWindow.m 2010-12-07 22:18:34 UTC (rev 6943)
@@ -106,7 +106,7 @@
contentRect.size = [image size];
contentRect.origin.x = thePoint.x;
contentRect.origin.y = thePoint.y - WINDOW_OFFSET -
NSHeight(contentRect);
- contentRect = SKConstrainRect(contentRect, [[NSScreen
screenForPoint:thePoint] visibleFrame]);
+ contentRect = [self constrainFrameRect:contentRect toScreen:[NSScreen
screenForPoint:thePoint]];
[self setFrame:[self frameRectForContentRect:contentRect] display:NO];
[self stopAnimation];
Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m 2010-12-07 15:45:06 UTC (rev
6942)
+++ trunk/SKMainWindowController_Actions.m 2010-12-07 22:18:34 UTC (rev
6943)
@@ -795,7 +795,7 @@
// Align the window frame from the old topleft point and constrain to the
screen
frame.origin.y = NSMaxY(frame) - size.height;
frame.size = size;
- frame = SKConstrainRect(frame, [([[self window] screen] ?: [NSScreen
mainScreen]) visibleFrame]);
+ frame = [[self window] constrainFrameRect:frame toScreen:[[self window]
screen] ?: [NSScreen mainScreen]];
[[self window] setFrame:frame display:[[self window] isVisible]];
}
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2010-12-07 15:45:06 UTC (rev 6942)
+++ trunk/SKSnapshotWindowController.m 2010-12-07 22:18:34 UTC (rev 6943)
@@ -237,7 +237,7 @@
contentRect.size.width += [NSScroller scrollerWidth];
contentRect.size.height += [NSScroller scrollerWidth];
frame.size = [[self window] frameRectForContentRect:contentRect].size;
- frame = SKConstrainRect(frame, [([[self window] screen] ?: [NSScreen
mainScreen]) visibleFrame]);
+ frame = [[self window] constrainFrameRect:frame toScreen:[[self window]
screen] ?: [NSScreen mainScreen]];
[self
setWindowFrameAutosaveNameOrCascade:SKSnapshotWindowFrameAutosaveName];
[[self window] setFrame:NSIntegralRect(frame) display:NO animate:NO];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit