Revision: 2676
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2676&view=rev
Author:   hofman
Date:     2007-08-17 11:37:43 -0700 (Fri, 17 Aug 2007)

Log Message:
-----------
Change resize knob for note table rows. Make default row height 2px higher to 
allow more space for the resize knob.

Modified Paths:
--------------
    trunk/SKNoteOutlineView.m
    trunk/SKNotesDocument.m
    trunk/SKPDFAnnotationNote.m

Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m   2007-08-17 14:49:07 UTC (rev 2675)
+++ trunk/SKNoteOutlineView.m   2007-08-17 18:37:43 UTC (rev 2676)
@@ -169,17 +169,15 @@
                 continue;
             
             BOOL isHighlighted = isFirstResponder && [self isRowSelected:row];
-            NSColor *color = isHighlighted ? [NSColor whiteColor] : [NSColor 
grayColor];
+            NSColor *color = [NSColor colorWithCalibratedWhite:isHighlighted ? 
1.0 : 0.5 alpha:0.7];
             NSRect rect = [self rectOfRow:row];
-            NSPoint startPoint = NSMakePoint(NSMaxX(rect) - 20.0, NSMaxY(rect) 
- 1.5);
-            NSPoint endPoint = NSMakePoint(NSMaxX(rect), NSMaxY(rect) - 1.5);
+            float x = ceilf(NSMidX(rect));
+            float y = NSMaxY(rect) - 1.5;
             
             [color set];
-            [NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
-            [[color colorWithAlphaComponent:0.5] set];
-            startPoint.y -= 2.0;
-            endPoint.y -= 2.0;
-            [NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
+            [NSBezierPath strokeLineFromPoint:NSMakePoint(x - 1.0, y) 
toPoint:NSMakePoint(x + 1.0, y)];
+            y -= 2.0;
+            [NSBezierPath strokeLineFromPoint:NSMakePoint(x - 3.0, y) 
toPoint:NSMakePoint(x + 3.0, y)];
         }
         
         [NSGraphicsContext restoreGraphicsState];

Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m     2007-08-17 14:49:07 UTC (rev 2675)
+++ trunk/SKNotesDocument.m     2007-08-17 18:37:43 UTC (rev 2676)
@@ -116,7 +116,7 @@
                 
                 if ([[dict valueForKey:@"type"] isEqualToString:@"Note"])
                     [note setObject:[NSMutableDictionary 
dictionaryWithObjectsAndKeys:[NSNumber numberWithFloat:85.0], @"rowHeight", 
[dict valueForKey:@"text"], @"contents", nil] forKey:@"child"];
-                [note setObject:[NSNumber numberWithFloat:17.0] 
forKey:@"rowHeight"];
+                [note setObject:[NSNumber numberWithFloat:19.0] 
forKey:@"rowHeight"];
                 
                 [newNotes addObject:note];
                 [note release];

Modified: trunk/SKPDFAnnotationNote.m
===================================================================
--- trunk/SKPDFAnnotationNote.m 2007-08-17 14:49:07 UTC (rev 2675)
+++ trunk/SKPDFAnnotationNote.m 2007-08-17 18:37:43 UTC (rev 2676)
@@ -576,7 +576,7 @@
         [[self border] setLineWidth:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKCircleNoteLineWidthKey]];
         [[self border] setDashPattern:[[NSUserDefaults standardUserDefaults] 
arrayForKey:SKCircleNoteDashPatternKey]];
         [[self border] setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKCircleNoteLineStyleKey]];
-        rowHeight = 17.0;
+        rowHeight = 19.0;
     }
     return self;
 }
@@ -650,7 +650,7 @@
         [[self border] setLineWidth:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKSquareNoteLineWidthKey]];
         [[self border] setDashPattern:[[NSUserDefaults standardUserDefaults] 
arrayForKey:SKSquareNoteDashPatternKey]];
         [[self border] setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKSquareNoteLineStyleKey]];
-        rowHeight = 17.0;
+        rowHeight = 19.0;
     }
     return self;
 }
@@ -786,7 +786,7 @@
         numberOfLines = 0;
         lineRects = NULL;
         
-        rowHeight = 17.0;
+        rowHeight = 19.0;
     }
     return self;
 }
@@ -1036,7 +1036,7 @@
         [border setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKFreeTextNoteLineStyleKey]];
         originalSetBorder(self, @selector(setBorder:), [border lineWidth] > 
0.0 ? border : nil);
         [border release];
-        rowHeight = 17.0;
+        rowHeight = 19.0;
     }
     return self;
 }
@@ -1141,7 +1141,7 @@
         textStorage = [[NSTextStorage allocWithZone:[self zone]] init];
         [textStorage setDelegate:self];
         text = [[NSAttributedString alloc] init];
-        rowHeight = 17.0;
+        rowHeight = 19.0;
     }
     return self;
 }
@@ -1341,7 +1341,7 @@
         [border setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKLineNoteLineStyleKey]];
         originalSetBorder(self, @selector(setBorder:), [border lineWidth] > 
0.0 ? border : nil);
         [border release];
-        rowHeight = 17.0;
+        rowHeight = 19.0;
     }
     return self;
 }


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