Skip to content

Commit

Permalink
slightly delay triggering the action in CPControl performClick: to ma…
Browse files Browse the repository at this point in the history
…ke sure the click is always visible
  • Loading branch information
klaaspieter committed Jun 16, 2010
1 parent 17a8be1 commit eaf4fa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AppKit/CPControl.j
Expand Up @@ -337,13 +337,13 @@ var CPControlBlackColor = [CPColor blackColor];

[self highlight:YES];
[self setState:[self nextState]];
[self sendAction:[self action] to:[self target]];

[CPTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unhighlightButtonTimerDidFinish:) userInfo:nil repeats:NO];
}

- (void)unhighlightButtonTimerDidFinish:(id)sender
{
[self sendAction:[self action] to:[self target]];
[self highlight:NO];
}

Expand Down

0 comments on commit eaf4fa2

Please sign in to comment.