Revision: 3099
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3099&view=rev
Author:   hofman
Date:     2007-10-30 06:18:19 -0700 (Tue, 30 Oct 2007)

Log Message:
-----------
Use rowsize as appropriate for font size for note table by default.

Modified Paths:
--------------
    trunk/SKFindTableView.m
    trunk/SKMainWindowController.m
    trunk/SKNotesDocument.m
    trunk/SKPDFAnnotationNote.m
    trunk/SKTocOutlineView.m

Modified: trunk/SKFindTableView.m
===================================================================
--- trunk/SKFindTableView.m     2007-10-30 12:57:01 UTC (rev 3098)
+++ trunk/SKFindTableView.m     2007-10-30 13:18:19 UTC (rev 3099)
@@ -37,6 +37,7 @@
  */
 
 #import "SKFindTableView.h"
+#import "SKStringConstants.h"
 
 
 @implementation SKFindTableView

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2007-10-30 12:57:01 UTC (rev 3098)
+++ trunk/SKMainWindowController.m      2007-10-30 13:18:19 UTC (rev 3099)
@@ -3444,12 +3444,14 @@
 }
 
 - (float)outlineView:(NSOutlineView *)ov heightOfRowByItem:(id)item {
+    float rowHeight = 0.0;
     if ([ov isEqual:noteOutlineView]) {
         // the item is an opaque wrapper object used for binding. The actual 
note is is given by -observedeObject. I don't know of any alternative (read 
public) way to get the actual item
         if ([item respondsToSelector:@selector(rowHeight)])
-            return [item rowHeight];
+            rowHeight = [item rowHeight];
+        return rowHeight > 0.0 ? rowHeight : [ov rowHeight] + 2.0;
     }
-    return [ov rowHeight];
+    return rowHeight > 0.0 ? rowHeight : [ov rowHeight];
 }
 
 - (BOOL)outlineView:(NSOutlineView *)ov canResizeRowByItem:(id)item {

Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m     2007-10-30 12:57:01 UTC (rev 3098)
+++ trunk/SKNotesDocument.m     2007-10-30 13:18:19 UTC (rev 3099)
@@ -145,7 +145,6 @@
                 [note setValue:contents forKey:@"contents"];
                 [contents release];
             }
-            [note setObject:[NSNumber numberWithFloat:[outlineView rowHeight] 
+ 2.0] forKey:@"rowHeight"];
             
             [newNotes addObject:note];
             [note release];
@@ -397,7 +396,7 @@
 
 - (float)outlineView:(NSOutlineView *)ov heightOfRowByItem:(id)item {
     NSNumber *heightNumber = [item valueForKey:@"rowHeight"];
-    return heightNumber ? [heightNumber floatValue] : [ov rowHeight];
+    return heightNumber ? [heightNumber floatValue] : [ov rowHeight] + 2.0;
 }
 
 - (void)outlineView:(NSOutlineView *)ov setHeightOfRow:(int)newHeight 
byItem:(id)item {

Modified: trunk/SKPDFAnnotationNote.m
===================================================================
--- trunk/SKPDFAnnotationNote.m 2007-10-30 12:57:01 UTC (rev 3098)
+++ trunk/SKPDFAnnotationNote.m 2007-10-30 13:18:19 UTC (rev 3099)
@@ -627,7 +627,7 @@
         [[self border] setLineWidth:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKCircleNoteLineWidthKey]];
         [[self border] setDashPattern:[[NSUserDefaults standardUserDefaults] 
arrayForKey:SKCircleNoteDashPatternKey]];
         [[self border] setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKCircleNoteLineStyleKey]];
-        rowHeight = 19.0;
+        rowHeight = 0.0;
     }
     return self;
 }
@@ -702,7 +702,7 @@
         [[self border] setLineWidth:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKSquareNoteLineWidthKey]];
         [[self border] setDashPattern:[[NSUserDefaults standardUserDefaults] 
arrayForKey:SKSquareNoteDashPatternKey]];
         [[self border] setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKSquareNoteLineStyleKey]];
-        rowHeight = 19.0;
+        rowHeight = 0.0;
     }
     return self;
 }
@@ -840,7 +840,7 @@
         numberOfLines = 0;
         lineRects = NULL;
         
-        rowHeight = 19.0;
+        rowHeight = 0.0;
     }
     return self;
 }
@@ -1095,7 +1095,7 @@
         [border setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKFreeTextNoteLineStyleKey]];
         originalSetBorder(self, @selector(setBorder:), [border lineWidth] > 
0.0 ? border : nil);
         [border release];
-        rowHeight = 19.0;
+        rowHeight = 0.0;
     }
     return self;
 }
@@ -1200,7 +1200,7 @@
         textStorage = [[NSTextStorage allocWithZone:[self zone]] init];
         [textStorage setDelegate:self];
         text = [[NSAttributedString alloc] init];
-        rowHeight = 19.0;
+        rowHeight = 0.0;
     }
     return self;
 }
@@ -1448,7 +1448,7 @@
         [border setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKLineNoteLineStyleKey]];
         originalSetBorder(self, @selector(setBorder:), [border lineWidth] > 
0.0 ? border : nil);
         [border release];
-        rowHeight = 19.0;
+        rowHeight = 0.0;
     }
     return self;
 }

Modified: trunk/SKTocOutlineView.m
===================================================================
--- trunk/SKTocOutlineView.m    2007-10-30 12:57:01 UTC (rev 3098)
+++ trunk/SKTocOutlineView.m    2007-10-30 13:18:19 UTC (rev 3099)
@@ -39,6 +39,7 @@
 #import "SKTocOutlineView.h"
 #import "SKTypeSelectHelper.h"
 #import "NSColor_SKExtensions.h"
+#import "SKStringConstants.h"
 
 
 @implementation SKTocOutlineView


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
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to