aboutsummaryrefslogtreecommitdiff
path: root/AppKit
diff options
context:
space:
mode:
Diffstat (limited to 'AppKit')
-rw-r--r--AppKit/GTMNSAnimation+Duration.m11
1 files changed, 5 insertions, 6 deletions
diff --git a/AppKit/GTMNSAnimation+Duration.m b/AppKit/GTMNSAnimation+Duration.m
index e3d0d81..1f09492 100644
--- a/AppKit/GTMNSAnimation+Duration.m
+++ b/AppKit/GTMNSAnimation+Duration.m
@@ -35,12 +35,11 @@ NSTimeInterval GTMModifyDurationBasedOnCurrentState(NSTimeInterval duration,
// Tab and shift-tab are often used for navigating around UI elements,
// and in the majority of cases slowing down the animations while
// navigating around UI elements is not desired.
- if ((currentEventMask & (NSKeyDownMask | NSKeyUpMask))
- && !(modifiers & NSControlKeyMask)
- && ([[currentEvent characters] length] == 1)
- && ([[currentEvent characters] characterAtIndex:0] == 25)) {
- duration = duration;
- } else {
+ BOOL isShiftTab = (currentEventMask & (NSKeyDownMask | NSKeyUpMask))
+ && !(modifiers & NSControlKeyMask)
+ && ([[currentEvent characters] length] == 1)
+ && ([[currentEvent characters] characterAtIndex:0] == 25);
+ if (!isShiftTab) {
duration *= 5.0;
}
}