Revision: 4578
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4578&view=rev
Author:   hofman
Date:     2008-09-08 09:30:58 +0000 (Mon, 08 Sep 2008)

Log Message:
-----------
Use table rowheight as minimum row height rather than 1, so the page numebrs 
are always displayed correctly

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

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2008-09-07 15:09:30 UTC (rev 4577)
+++ trunk/SKMainWindowController_UI.m   2008-09-08 09:30:58 UTC (rev 4578)
@@ -337,8 +337,8 @@
         NSSize thumbSize = [[[thumbnails objectAtIndex:row] image] size];
         NSSize cellSize = NSMakeSize([[tv 
tableColumnWithIdentifier:SKMainWindowImageColumnIdentifer] width], 
                                      fminf(thumbSize.height, 
roundedThumbnailSize));
-        if (thumbSize.height < 1.0)
-            return 1.0;
+        if (thumbSize.height < [tv rowHeight])
+            return [tv rowHeight];
         else if (thumbSize.width / thumbSize.height < cellSize.width / 
cellSize.height)
             return cellSize.height;
         else
@@ -347,8 +347,8 @@
         NSSize thumbSize = [[[[snapshotArrayController arrangedObjects] 
objectAtIndex:row] thumbnail] size];
         NSSize cellSize = NSMakeSize([[tv 
tableColumnWithIdentifier:SKMainWindowImageColumnIdentifer] width], 
                                      fminf(thumbSize.height, 
roundedSnapshotThumbnailSize));
-        if (thumbSize.height < 1.0)
-            return 1.0;
+        if (thumbSize.height < [tv rowHeight])
+            return [tv rowHeight];
         else if (thumbSize.width / thumbSize.height < cellSize.width / 
cellSize.height)
             return cellSize.height;
         else
@@ -706,15 +706,15 @@
 }
 
 - (float)outlineView:(NSOutlineView *)ov heightOfRowByItem:(id)item {
-    float rowHeight = 0.0;
     if ([ov isEqual:noteOutlineView]) {
+        float rowHeight = 0.0;
         if (CFDictionaryContainsKey(rowHeights, (const void *)item))
             rowHeight = *(float *)CFDictionaryGetValue(rowHeights, (const void 
*)item);
         else if ([item type] == nil)
             rowHeight = 85.0;
         return rowHeight > 0.0 ? rowHeight : [ov rowHeight] + 2.0;
     }
-    return rowHeight > 0.0 ? rowHeight : [ov rowHeight];
+    return [ov rowHeight];
 }
 
 - (BOOL)outlineView:(NSOutlineView *)ov canResizeRowByItem:(id)item {


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to