Revision: 3109
http://skim-app.svn.sourceforge.net/skim-app/?rev=3109&view=rev
Author: hofman
Date: 2007-10-31 05:39:44 -0700 (Wed, 31 Oct 2007)
Log Message:
-----------
Use correct font size for search result.
Modified Paths:
--------------
trunk/PDFSelection_SKExtensions.m
Modified: trunk/PDFSelection_SKExtensions.m
===================================================================
--- trunk/PDFSelection_SKExtensions.m 2007-10-31 12:22:10 UTC (rev 3108)
+++ trunk/PDFSelection_SKExtensions.m 2007-10-31 12:39:44 UTC (rev 3109)
@@ -42,6 +42,7 @@
#import "PDFPage_SKExtensions.h"
#import "SKPDFAnnotationNote.h"
#import "SKDocument.h"
+#import "SKStringConstants.h"
@interface PDFSelection (PDFSelectionPrivateDeclarations)
@@ -67,7 +68,9 @@
NSString *ellipse = [NSString stringWithFormat:@"%C", 0x2026];
NSRange foundRange;
NSDictionary *attributes;
-
+ NSNumber *fontSizeNumber = [[NSUserDefaults standardUserDefaults]
objectForKey:SKTableFontSizeKey];
+ float fontSize = fontSizeNumber ? [fontSizeNumber floatValue] : 0.0;
+
// Extend selection.
[extendedSelection extendSelectionAtStart:10];
[extendedSelection extendSelectionAtEnd:50];
@@ -85,7 +88,7 @@
foundRange = [sample rangeOfString:searchString
options:NSCaseInsensitiveSearch];
if (foundRange.location != NSNotFound) {
// Bold the text range where the search term was found.
- attributes = [[NSDictionary alloc] initWithObjectsAndKeys:[NSFont
boldSystemFontOfSize:[NSFont systemFontSize]], NSFontAttributeName, nil];
+ attributes = [[NSDictionary alloc] initWithObjectsAndKeys:[NSFont
boldSystemFontOfSize:fontSize], NSFontAttributeName, nil];
[attributedSample setAttributes:attributes
range:NSMakeRange(foundRange.location + 1, foundRange.length)];
[attributes release];
}
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