Revision: 16417
          http://sourceforge.net/p/skim-app/code/16417
Author:   hofman
Date:     2026-09-03 21:48:49 +0000 (Thu, 03 Sep 2026)
Log Message:
-----------
set loupe view as contentView of box on older systems, no need for overlapping 
views

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

Modified: trunk/SKLoupeController.m
===================================================================
--- trunk/SKLoupeController.m   2026-09-03 21:42:29 UTC (rev 16416)
+++ trunk/SKLoupeController.m   2026-09-03 21:48:49 UTC (rev 16417)
@@ -115,18 +115,20 @@
     [layer setMasksToBounds:YES];
     [layer setActions:@{@"contents":[NSNull null]}];
     [layer setFrame:NSRectToCGRect([pdfView bounds])];
-    if (@available(macOS 10.14, *)) {} else {
+    NSView *loupeView = [[NSView alloc] initWithFrame:[pdfView bounds]];
+    [loupeView setLayer:layer];
+    [loupeView setWantsLayer:YES];
+    if (@available(macOS 10.14, *)) {
+        [loupeView setAutoresizingMask:NSViewWidthSizable | 
NSViewHeightSizable];
+        [contentView addSubview:loupeView];
+    } else {
         [layer setCornerRadius:LOUPE_RADIUS];
         CGColorRef borderColor = CGColorCreateGenericGray(LOUPE_BORDER_GRAY, 
1.0);
         [layer setBorderColor:borderColor];
         [layer setBorderWidth:LOUPE_BORDER_WIDTH];
         CGColorRelease(borderColor);
+        [bgView2 setContentView:loupeView];
     }
-    NSView *loupeView = [[NSView alloc] initWithFrame:[pdfView bounds]];
-    [loupeView setLayer:layer];
-    [loupeView setWantsLayer:YES];
-    [loupeView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
-    [contentView addSubview:loupeView];
     [window setHasShadow:YES];
     *viewp = bgView;
     *layerp = layer;

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