From 5b7d38c091a7e539181709892e781316cd57a85d Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 25 May 2009 22:13:03 +0000 Subject: =?UTF-8?q?=E2=80=A2=20added=20two=20finger=20zoom=20gesture=20for?= =?UTF-8?q?=20de/increasing=20the=20font=20size=20of=20the=20Custom=20Quer?= =?UTF-8?q?y=20Editor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CMTextView.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Source/CMTextView.m') diff --git a/Source/CMTextView.m b/Source/CMTextView.m index 9b5fb9aa..5afe2fef 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -2598,6 +2598,21 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) NSBeep(); } +#pragma mark - +#pragma mark multi-touch trackpad support + +/* + * Trackpad two-finger zooming gesture in/decreases the font size + */ +- (void) magnifyWithEvent:(NSEvent *)anEvent +{ + if([anEvent deltaZ]>5.0) + [self makeTextSizeLarger]; + else if([anEvent deltaZ]<-5.0) + [self makeTextSizeSmaller]; + + [self insertText:@""]; +} @end -- cgit v1.2.3