Revision: 12166
          http://sourceforge.net/p/skim-app/code/12166
Author:   hofman
Date:     2021-03-04 14:51:11 +0000 (Thu, 04 Mar 2021)
Log Message:
-----------
Hidden pref to set the image tool tip scale, 0 to match current scale factor 
from pdfview

Modified Paths:
--------------
    trunk/SKImageToolTipWindow.m

Modified: trunk/SKImageToolTipWindow.m
===================================================================
--- trunk/SKImageToolTipWindow.m        2021-03-04 00:08:28 UTC (rev 12165)
+++ trunk/SKImageToolTipWindow.m        2021-03-04 14:51:11 UTC (rev 12166)
@@ -52,6 +52,8 @@
 #define WINDOW_LEVEL            ((NSWindowLevel)104)
 #endif
 
+#define SKToolTipScaleKey @"SKToolTipScale"
+
 @implementation SKImageToolTipWindow
 
 @synthesize currentImageContext=context;
@@ -98,9 +100,10 @@
 }
 
 - (void)showDelayed {
+    CGFloat usedScale = [[NSUserDefaults standardUserDefaults] 
floatForKey:SKToolTipScaleKey];
     NSPoint thePoint = NSEqualPoints(point, NSZeroPoint) ? [NSEvent 
mouseLocation] : point;
     NSRect contentRect = NSZeroRect, screenRect = [[NSScreen 
screenForPoint:thePoint] frame];
-    NSImage *image = [context toolTipImageWithScale:scale];
+    NSImage *image = [context toolTipImageWithScale:usedScale > 0.0 ? 
usedScale : scale];
     BOOL isOpaque = [[[image representations] firstObject] isOpaque];
     
     if (image) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to