mirror of
https://github.com/TermiT/Flycut.git
synced 2025-10-03 10:24:24 +08:00
mouse scroll to choose clippings and double click to paste
This commit is contained in:
parent
5e259802d9
commit
d583141f90
3 changed files with 25 additions and 2 deletions
|
@ -98,6 +98,7 @@
|
|||
-(void) showBezel;
|
||||
-(void) hideBezel;
|
||||
-(void) processBezelKeyDown:(NSEvent *)theEvent;
|
||||
-(void) processBezelMouseEvents:(NSEvent *)theEvent;
|
||||
-(void) metaKeysReleased;
|
||||
|
||||
// Menu related
|
||||
|
|
|
@ -1008,7 +1008,19 @@
|
|||
DLog(@"CODE %ld", (long)[mainRecorder keyCombo].code);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void) processBezelMouseEvents:(NSEvent *)theEvent {
|
||||
if (theEvent.type == NSScrollWheel) {
|
||||
if (theEvent.deltaY > 0.0f) {
|
||||
[self stackUp];
|
||||
} else if (theEvent.deltaY < 0.0f) {
|
||||
[self stackDown];
|
||||
}
|
||||
} else if (theEvent.type == NSLeftMouseUp && theEvent.clickCount == 2) {
|
||||
[self pasteFromStack];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)notification
|
||||
|
@ -1048,7 +1060,8 @@
|
|||
[bezel setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
|
||||
// if ([[NSUserDefaults standardUserDefaults] boolForKey:@"popUpAnimation"])
|
||||
// [bezel makeKeyAndOrderFrontWithPopEffect];
|
||||
else [bezel makeKeyAndOrderFront:self];
|
||||
// else
|
||||
[bezel makeKeyAndOrderFront:self];
|
||||
isBezelDisplayed = YES;
|
||||
}
|
||||
|
||||
|
|
|
@ -332,6 +332,15 @@ static const float lineHeight = 16;
|
|||
}
|
||||
}
|
||||
|
||||
- (void)mouseUp:(NSEvent *)theEvent
|
||||
{
|
||||
if ( [self delegate] )
|
||||
{
|
||||
[delegate performSelector:@selector(processBezelMouseEvents:) withObject:theEvent];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)keyDown:(NSEvent *)theEvent {
|
||||
if ( [self delegate] )
|
||||
|
|
Loading…
Add table
Reference in a new issue