Revision: 12247
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12247&view=rev
Author: amaxwell
Date: 2008-01-03 21:47:19 -0800 (Thu, 03 Jan 2008)
Log Message:
-----------
Allow multiline message text. Fixes problem with file migration alert message.
Modified Paths:
--------------
trunk/bibdesk/BDSKAlert.m
Modified: trunk/bibdesk/BDSKAlert.m
===================================================================
--- trunk/bibdesk/BDSKAlert.m 2008-01-04 05:46:26 UTC (rev 12246)
+++ trunk/bibdesk/BDSKAlert.m 2008-01-04 05:47:19 UTC (rev 12247)
@@ -227,9 +227,29 @@
// see if we should resize the message text
NSRect frame = [[self window] frame];
+ NSRect messageFieldRect = [messageField frame];
+ NSRect textRect = [[messageField attributedStringValue]
boundingRectForDrawingInViewWithSize:NSMakeSize(NSWidth(messageFieldRect),
200.0)];
+ float extraHeight = NSHeight(textRect) - NSHeight(messageFieldRect);
+
+ if (extraHeight > 0) {
+ frame.size.height += extraHeight;
+ messageFieldRect.size.height += extraHeight;
+ messageFieldRect.origin.y -= extraHeight;
+ [messageField setFrame:messageFieldRect];
+
+ // shift info field downward as well
+ NSRect infoRect = [informationField frame];
+ infoRect.origin.y -= extraHeight;
+ [informationField setFrame:infoRect];
+
+ [[self window] setFrame:frame display:NO];
+ }
+
+ // see if we should resize the informative text
+ frame = [[self window] frame];
NSRect infoRect = [informationField frame];
- NSRect textRect = [[informationField attributedStringValue]
boundingRectForDrawingInViewWithSize:NSMakeSize(NSWidth(infoRect), 200.0)];
- float extraHeight = NSHeight(textRect) - NSHeight(infoRect);
+ textRect = [[informationField attributedStringValue]
boundingRectForDrawingInViewWithSize:NSMakeSize(NSWidth(infoRect), 200.0)];
+ extraHeight = NSHeight(textRect) - NSHeight(infoRect);
if (extraHeight > 0) {
frame.size.height += extraHeight;
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit