slightly delay triggering the action in CPControl performClick: to make sure the click is always visible

This commit is contained in:
Klaas Pieter Annema committed 2010-06-16 14:16:17 +02:00
1 parent 17a8be1ae6
commit eaf4fa240f
1 file changed
+1 -1
+1 -1
View File
@@ -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];
}