Skip to content

Commit 70055dd

Browse files
Simone Manganellirentzsch
Simone Manganelli
authored andcommitted
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 <[email protected]>
1 parent 181c096 commit 70055dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Plugin/Plugin.m

+5
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,11 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
636636
// add the gear for the contextual menu, but only if the view is
637637
// greater than a certain size
638638

639+
// de-apply the scaling factor first, otherwise drawing will be off
640+
NSAffineTransform *xformTwo = [NSAffineTransform transform];
641+
[xformTwo scaleBy: 1/scaleFactor];
642+
[xformTwo concat];
643+
639644
if ((viewWidth > 32) && (viewHeight > 32)) {
640645
float margin = 5.0;
641646
NSImage *gearImage = [NSImage imageNamed:@"NSActionTemplate"];

0 commit comments

Comments
 (0)