Revision: 5303
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5303&view=rev
Author:   hofman
Date:     2009-04-03 23:47:29 +0000 (Fri, 03 Apr 2009)

Log Message:
-----------
use slightly larger rowheight in TOC outline to accommodate the source list 
style

Modified Paths:
--------------
    trunk/SKOutlineView.h
    trunk/SKOutlineView.m
    trunk/SKTocOutlineView.m

Modified: trunk/SKOutlineView.h
===================================================================
--- trunk/SKOutlineView.h       2009-04-03 14:16:38 UTC (rev 5302)
+++ trunk/SKOutlineView.h       2009-04-03 23:47:29 UTC (rev 5303)
@@ -45,6 +45,7 @@
 }
 
 + (BOOL)usesDefaultFontSize;
++ (float)rowHeightForFont:(NSFont *)font;
 
 - (NSArray *)selectedItems;
 

Modified: trunk/SKOutlineView.m
===================================================================
--- trunk/SKOutlineView.m       2009-04-03 14:16:38 UTC (rev 5302)
+++ trunk/SKOutlineView.m       2009-04-03 23:47:29 UTC (rev 5303)
@@ -50,6 +50,10 @@
 
 + (BOOL)usesDefaultFontSize { return NO; }
 
++ (float)rowHeightForFont:(NSFont *)font {
+    return [NSLayoutManager defaultViewLineHeightForFont:font];
+}
+
 - (void)dealloc {
     if ([[self class] usesDefaultFontSize]) {
         @try { [[NSUserDefaultsController sharedUserDefaultsController] 
removeObserver:self forKey:SKTableFontSizeKey]; }
@@ -241,7 +245,7 @@
             [cell setFont:font];
     }
     
-    [self setRowHeight:[NSLayoutManager defaultViewLineHeightForFont:font]];
+    [self setRowHeight:[[self class] rowHeightForFont:font]];
     [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndexesInRange:NSMakeRange(0, [self numberOfRows])]];
 }
 

Modified: trunk/SKTocOutlineView.m
===================================================================
--- trunk/SKTocOutlineView.m    2009-04-03 14:16:38 UTC (rev 5302)
+++ trunk/SKTocOutlineView.m    2009-04-03 23:47:29 UTC (rev 5303)
@@ -45,6 +45,13 @@
 
 + (BOOL)usesDefaultFontSize { return YES; }
 
++ (float)rowHeightForFont:(NSFont *)font {
+    float rowHeight = [super rowHeightForFont:font];
+    if ([self 
instancesRespondToSelector:@selector(setSelectionHighlightStyle:)])
+        rowHeight += 2.0;
+    return rowHeight;
+}
+
 - (id)initWithFrame:(NSRect)frameRect {
     if (self = [super initWithFrame:frameRect]) {
         if ([self respondsToSelector:@selector(setSelectionHighlightStyle:)])


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

------------------------------------------------------------------------------
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to