Revision: 3326
http://skim-app.svn.sourceforge.net/skim-app/?rev=3326&view=rev
Author: hofman
Date: 2007-12-09 08:21:03 -0800 (Sun, 09 Dec 2007)
Log Message:
-----------
Activate mouseover for navigation buttons in button class when the tooltip is
set. Fix a Tiger bug.
Modified Paths:
--------------
trunk/SKNavigationWindow.m
Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m 2007-12-08 20:00:16 UTC (rev 3325)
+++ trunk/SKNavigationWindow.m 2007-12-09 16:21:03 UTC (rev 3326)
@@ -75,7 +75,6 @@
[button setTarget:controller];
[button setAction:@selector(doGoToPreviousPage:)];
[button setToolTip:NSLocalizedString(@"Previous", @"Tool tip
message")];
- [button setShowsBorderOnlyWhileMouseInside:YES];
[[self contentView] addSubview:button];
rect.origin.x = NSMaxX(rect);
@@ -83,7 +82,6 @@
[button setTarget:controller];
[button setAction:@selector(doGoToNextPage:)];
[button setToolTip:NSLocalizedString(@"Next", @"Tool tip message")];
- [button setShowsBorderOnlyWhileMouseInside:YES];
[[self contentView] addSubview:button];
rect.origin.x = NSMaxX(rect);
@@ -99,7 +97,6 @@
[button setToolTip:NSLocalizedString(@"Fit to Screen", @"Tool tip
message")];
[button setAlternateToolTip:NSLocalizedString(@"Actual Size", @"Tool
tip message")];
[button setState:[pdfView autoScales]];
- [button setShowsBorderOnlyWhileMouseInside:YES];
[[self contentView] addSubview:button];
[[NSNotificationCenter defaultCenter] addObserver: button selector:
@selector(handleScaleChangedNotification:)
name:
PDFViewScaleChangedNotification object: pdfView];
@@ -115,7 +112,6 @@
[button setTarget:controller];
[button setAction:@selector(exitFullScreen:)];
[button setToolTip:NSLocalizedString(@"Close", @"Tool tip message")];
- [button setShowsBorderOnlyWhileMouseInside:YES];
[[self contentView] addSubview:button];
}
return self;
@@ -332,6 +328,7 @@
if (toolTip != string) {
[toolTip release];
toolTip = [string retain];
+ [self setShowsBorderOnlyWhileMouseInside:[toolTip length] > 0];
}
}
@@ -350,6 +347,15 @@
}
}
+- (void)viewDidMoveToWindow {
+ // fix for a Tiger bug when a button is added to a window, it does not
reset the tracking rects
+ if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_4 && [self
showsBorderOnlyWhileMouseInside]) {
+ [self setShowsBorderOnlyWhileMouseInside:NO];
+ [self setShowsBorderOnlyWhileMouseInside:YES];
+ }
+ [super viewDidMoveToWindow];
+}
+
@end
@implementation SKNavigationButtonCell
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit