Revision: 5672
http://skim-app.svn.sourceforge.net/skim-app/?rev=5672&view=rev
Author: hofman
Date: 2009-09-04 16:21:55 +0000 (Fri, 04 Sep 2009)
Log Message:
-----------
set selection highlight style in the nib
Modified Paths:
--------------
trunk/MainWindow.nib/classes.nib
trunk/MainWindow.nib/keyedobjects.nib
trunk/SKThumbnailTableView.m
trunk/SKTocOutlineView.m
Modified: trunk/MainWindow.nib/classes.nib
===================================================================
--- trunk/MainWindow.nib/classes.nib 2009-09-04 16:08:15 UTC (rev 5671)
+++ trunk/MainWindow.nib/classes.nib 2009-09-04 16:21:55 UTC (rev 5672)
@@ -6,7 +6,7 @@
<array>
<dict>
<key>CLASS</key>
- <string>NSResponder</string>
+ <string>NSMenu</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
@@ -14,7 +14,7 @@
</dict>
<dict>
<key>CLASS</key>
- <string>NSMenu</string>
+ <string>NSResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
@@ -61,11 +61,11 @@
</dict>
<dict>
<key>CLASS</key>
- <string>BDSKCollapsibleView</string>
+ <string>SKFindTableView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>BDSKContainerView</string>
+ <string>SKTableView</string>
</dict>
<dict>
<key>CLASS</key>
@@ -82,11 +82,11 @@
</dict>
<dict>
<key>CLASS</key>
- <string>SKFindTableView</string>
+ <string>BDSKCollapsibleView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>SKTableView</string>
+ <string>BDSKContainerView</string>
</dict>
<dict>
<key>CLASS</key>
@@ -124,6 +124,14 @@
<string>NSResponder</string>
</dict>
<dict>
+ <key>CLASS</key>
+ <string>SKSnapshotPageCell</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSTextFieldCell</string>
+ </dict>
+ <dict>
<key>ACTIONS</key>
<dict>
<key>dismissNoteTypeSheet</key>
@@ -150,14 +158,6 @@
<string>SKOutlineView</string>
</dict>
<dict>
- <key>CLASS</key>
- <string>SKSnapshotPageCell</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSTextFieldCell</string>
- </dict>
- <dict>
<key>ACTIONS</key>
<dict>
<key>editBookmarks</key>
Modified: trunk/MainWindow.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/SKThumbnailTableView.m
===================================================================
--- trunk/SKThumbnailTableView.m 2009-09-04 16:08:15 UTC (rev 5671)
+++ trunk/SKThumbnailTableView.m 2009-09-04 16:21:55 UTC (rev 5672)
@@ -64,28 +64,8 @@
@end
-...@interface NSTableView (SKApplePrivate)
-- (id)_highlightColorForCell:(NSCell *)cell;
-...@end
-
@implementation SKThumbnailTableView
-#define TIGER_BACKGROUNDCOLOR [NSColor colorWithCalibratedRed:0.905882
green:0.929412 blue:0.964706 alpha:1.0]
-
-- (id)initWithFrame:(NSRect)frameRect {
- if (self = [super initWithFrame:frameRect]) {
- [self
setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList];
- }
- return self;
-}
-
-- (id)initWithCoder:(NSCoder *)coder {
- if (self = [super initWithCoder:coder]) {
- [self
setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList];
- }
- return self;
-}
-
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
@@ -99,23 +79,22 @@
static CGFloat disabledColorGraphite[3] = {40606.0/65535.0, 40606.0/65535.0,
40606.0/65535.0};
- (void)highlightSelectionInClipRect:(NSRect)clipRect {
- NSColor *color;
- NSInteger row;
- NSRect rect;
- CGFloat *rgb;
- BOOL isGraphite = [NSColor currentControlTint] == NSGraphiteControlTint;
- if ([[self window] isKeyWindow] && [[self window] firstResponder] == self)
- rgb = isGraphite ? keyColorGraphite : keyColorBlue;
- else if ([[self window] isMainWindow] || [[self window] isKeyWindow])
- rgb = isGraphite ? mainColorGraphite : mainColorBlue;
- else
- rgb = isGraphite ? disabledColorGraphite : disabledColorBlue;
- color = [NSColor colorWithDeviceRed:rgb[0] green:rgb[1] blue:rgb[2]
alpha:1.0];
-
- [NSGraphicsContext saveGraphicsState];
-
if ([[self delegate]
respondsToSelector:@selector(tableViewHighlightedRows:)]) {
+ NSColor *color;
+ NSInteger row;
+ NSRect rect;
+ CGFloat *rgb;
+ BOOL isGraphite = [NSColor currentControlTint] ==
NSGraphiteControlTint;
+ if ([[self window] isKeyWindow] && [[self window] firstResponder] ==
self)
+ rgb = isGraphite ? keyColorGraphite : keyColorBlue;
+ else if ([[self window] isMainWindow] || [[self window] isKeyWindow])
+ rgb = isGraphite ? mainColorGraphite : mainColorBlue;
+ else
+ rgb = isGraphite ? disabledColorGraphite : disabledColorBlue;
+ color = [NSColor colorWithDeviceRed:rgb[0] green:rgb[1] blue:rgb[2]
alpha:1.0];
+ [NSGraphicsContext saveGraphicsState];
+
NSMutableIndexSet *rowIndexes = [[[self selectedRowIndexes]
mutableCopy] autorelease];
NSArray *rows = [[self delegate] tableViewHighlightedRows:self];
NSInteger i, count = MIN((NSInteger)[rows count], 5);
@@ -129,10 +108,10 @@
}
[rowIndexes addIndex:row];
}
+
+ [NSGraphicsContext restoreGraphicsState];
}
- [NSGraphicsContext restoreGraphicsState];
-
[super highlightSelectionInClipRect:clipRect];
}
Modified: trunk/SKTocOutlineView.m
===================================================================
--- trunk/SKTocOutlineView.m 2009-09-04 16:08:15 UTC (rev 5671)
+++ trunk/SKTocOutlineView.m 2009-09-04 16:21:55 UTC (rev 5672)
@@ -41,28 +41,10 @@
#import "NSColor_SKExtensions.h"
-...@interface NSOutlineView (SKApplePrivate)
-- (id)_highlightColorForCell:(NSCell *)cell;
-...@end
-
@implementation SKTocOutlineView
+ (BOOL)usesDefaultFontSize { return YES; }
-- (id)initWithFrame:(NSRect)frameRect {
- if (self = [super initWithFrame:frameRect]) {
- [self
setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList];
- }
- return self;
-}
-
-- (id)initWithCoder:(NSCoder *)coder {
- if (self = [super initWithCoder:coder]) {
- [self
setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList];
- }
- return self;
-}
-
- (void)dealloc {
if (trackingRects != NULL)
CFRelease(trackingRects);
@@ -77,22 +59,22 @@
static CGFloat disabledColorGraphite[3] = {40606.0/65535.0, 40606.0/65535.0,
40606.0/65535.0};
- (void)highlightSelectionInClipRect:(NSRect)clipRect {
- NSColor *color;
- NSInteger row;
- NSRect rect;
- CGFloat *rgb;
- BOOL isGraphite = [NSColor currentControlTint] == NSGraphiteControlTint;
- if ([[self window] isKeyWindow] && [[self window] firstResponder] == self)
- rgb = isGraphite ? keyColorGraphite : keyColorBlue;
- else if ([[self window] isMainWindow] || [[self window] isKeyWindow])
- rgb = isGraphite ? mainColorGraphite : mainColorBlue;
- else
- rgb = isGraphite ? disabledColorGraphite : disabledColorBlue;
- color = [NSColor colorWithDeviceRed:rgb[0] green:rgb[1] blue:rgb[2]
alpha:1.0];
-
- [NSGraphicsContext saveGraphicsState];
-
if ([[self delegate]
respondsToSelector:@selector(outlineViewHighlightedRows:)]) {
+ NSColor *color;
+ NSInteger row;
+ NSRect rect;
+ CGFloat *rgb;
+ BOOL isGraphite = [NSColor currentControlTint] ==
NSGraphiteControlTint;
+ if ([[self window] isKeyWindow] && [[self window] firstResponder] ==
self)
+ rgb = isGraphite ? keyColorGraphite : keyColorBlue;
+ else if ([[self window] isMainWindow] || [[self window] isKeyWindow])
+ rgb = isGraphite ? mainColorGraphite : mainColorBlue;
+ else
+ rgb = isGraphite ? disabledColorGraphite : disabledColorBlue;
+ color = [NSColor colorWithDeviceRed:rgb[0] green:rgb[1] blue:rgb[2]
alpha:1.0];
+
+ [NSGraphicsContext saveGraphicsState];
+
NSMutableIndexSet *rowIndexes = [[[self selectedRowIndexes]
mutableCopy] autorelease];
NSArray *rows = [[self delegate] outlineViewHighlightedRows:self];
NSInteger i, count = MIN((NSInteger)[rows count], 5);
@@ -106,10 +88,10 @@
}
[rowIndexes addIndex:row];
}
+
+ [NSGraphicsContext restoreGraphicsState];
}
- [NSGraphicsContext restoreGraphicsState];
-
[super highlightSelectionInClipRect:clipRect];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit