Revision: 7648
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7648&view=rev
Author:   hofman
Date:     2012-02-15 17:48:34 +0000 (Wed, 15 Feb 2012)
Log Message:
-----------
fix natural height calculation of note outline items

Modified Paths:
--------------
    trunk/SKMainWindowController_UI.m
    trunk/SKNotesDocument.m

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2012-02-15 12:16:43 UTC (rev 7647)
+++ trunk/SKMainWindowController_UI.m   2012-02-15 17:48:34 UTC (rev 7648)
@@ -1008,10 +1008,8 @@
     NSTableColumn *tableColumn = [rightSideController.noteOutlineView 
tableColumnWithIdentifier:NOTE_COLUMNID];
     id cell = [tableColumn dataCell];
     CGFloat indentation = [rightSideController.noteOutlineView 
indentationPerLevel];
-    CGFloat width = NSWidth([cell drawingRectForBounds:NSMakeRect(0.0, 0.0, 
[tableColumn width] - indentation, rowHeight)]);
-    NSRect rect = NSMakeRect(0, CGFLOAT_MAX, width, CGFLOAT_MAX);
-    width = NSWidth([cell drawingRectForBounds:NSMakeRect(0.0, 0.0, 
NSWidth([rightSideController.noteOutlineView frame]) - 2 * indentation, 
rowHeight)]);
-    NSRect smallRect = NSMakeRect(0, CGFLOAT_MAX, width, CGFLOAT_MAX);
+    NSRect rect = NSMakeRect(0.0, 0.0, [tableColumn width] - indentation, 
CGFLOAT_MAX);
+    NSRect fullRect = NSMakeRect(0.0, 0.0,  
NSWidth([rightSideController.noteOutlineView frame]) - 2 * indentation, 
CGFLOAT_MAX);
     
     NSArray *items = [sender representedObject];
     
@@ -1027,7 +1025,7 @@
             height = [cell cellSizeForBounds:rect].height;
         } else {
             [cell setObjectValue:[item text]];
-            height = [cell cellSizeForBounds:smallRect].height;
+            height = [cell cellSizeForBounds:fullRect].height;
         }
         [rowHeights setFloat:fmax(height, rowHeight) + 2.0 forKey:item];
     }

Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m     2012-02-15 12:16:43 UTC (rev 7647)
+++ trunk/SKNotesDocument.m     2012-02-15 17:48:34 UTC (rev 7648)
@@ -520,10 +520,8 @@
     NSTableColumn *tableColumn = [outlineView 
tableColumnWithIdentifier:NOTE_COLUMNID];
     id cell = [tableColumn dataCell];
     CGFloat indentation = [outlineView indentationPerLevel];
-    CGFloat width = NSWidth([cell drawingRectForBounds:NSMakeRect(0.0, 0.0, 
[tableColumn width] - indentation, rowHeight)]);
-    NSRect rect = NSMakeRect(0, CGFLOAT_MAX, width, CGFLOAT_MAX);
-    width = NSWidth([cell drawingRectForBounds:NSMakeRect(0.0, 0.0, 
NSWidth([outlineView frame]) - 2 * indentation, rowHeight)]);
-    NSRect smallRect = NSMakeRect(0, CGFLOAT_MAX, width, CGFLOAT_MAX);
+    NSRect rect = NSMakeRect(0.0, 0.0, [tableColumn width] - indentation, 
CGFLOAT_MAX);
+    NSRect fullRect = NSMakeRect(0.0, 0.0, NSWidth([outlineView frame]) - 2 * 
indentation, CGFLOAT_MAX);
     
     NSArray *items = [sender representedObject];
     
@@ -540,7 +538,7 @@
             height = [cell cellSizeForBounds:rect].height;
         } else {
             [cell setObjectValue:[item text]];
-            height = [cell cellSizeForBounds:smallRect].height;
+            height = [cell cellSizeForBounds:fullRect].height;
         }
         [rowHeights setFloat:fmax(height, rowHeight) + 2.0 forKey:item];
     }

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


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to