From 70055dde3fa378e4440ba0d06180b987e578e148 Mon Sep 17 00:00:00 2001 From: Simone Manganelli Date: Wed, 22 Apr 2009 17:52:38 +0800 Subject: [PATCH] corrected small flaw where gear image is drawn in an incorrect position in rare cases; thanks to Peter Hosey for pointing out the cause Signed-off-by: Jonathan 'Wolf' Rentzsch --- Plugin/Plugin.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Plugin/Plugin.m b/Plugin/Plugin.m index f3862eff..c142bf0d 100644 --- a/Plugin/Plugin.m +++ b/Plugin/Plugin.m @@ -636,6 +636,11 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed // add the gear for the contextual menu, but only if the view is // greater than a certain size + // de-apply the scaling factor first, otherwise drawing will be off + NSAffineTransform *xformTwo = [NSAffineTransform transform]; + [xformTwo scaleBy: 1/scaleFactor]; + [xformTwo concat]; + if ((viewWidth > 32) && (viewHeight > 32)) { float margin = 5.0; NSImage *gearImage = [NSImage imageNamed:@"NSActionTemplate"];