Revision: 16233
          http://sourceforge.net/p/skim-app/code/16233
Author:   hofman
Date:     2026-05-06 15:00:09 +0000 (Wed, 06 May 2026)
Log Message:
-----------
use same margin for find results and search results

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2026-05-06 14:51:07 UTC (rev 16232)
+++ trunk/SKMainWindowController.m      2026-05-06 15:00:09 UTC (rev 16233)
@@ -125,6 +125,8 @@
 #define MIN_PDF_PANE_WIDTH 100.0
 #define MIN_PDF_PANE_HEIGHT 50.0
 
+#define FIND_RESULT_MARGIN 50.0
+
 #define OVERVIEW_DURATION 0.5
 
 #define SEARCHRESULTS_KEY           @"searchResults"
@@ -1821,7 +1823,7 @@
     if (selection) {
         PDFPage *page = [selection safeFirstPage];
         NSRect rect = [selection boundsForPage:page];
-        rect = ([page rotation] & 180) ? NSInsetRect(rect, -20.0, -10.0) : 
NSInsetRect(rect, -10.0, -20.0);
+        rect = NSIntersectionRect(NSInsetRect(rect, -FIND_RESULT_MARGIN, 
-FIND_RESULT_MARGIN), [page boundsForBox:kPDFDisplayBoxCropBox]);
         [pdfView goToRect:rect onPage:page];
         [leftSideController.findTableView deselectAll:self];
         [leftSideController.groupedFindTableView deselectAll:self];
@@ -1945,8 +1947,6 @@
     }
 }
 
-#define FIND_RESULT_MARGIN 50.0
-
 - (void)selectFindResultHighlight:(NSSelectionDirection)direction {
     [self updateFindResultHighlightsForDirection:direction];
     if (direction == NSDirectSelection && [self interactionMode] == 
SKPresentationMode && [[NSUserDefaults standardUserDefaults] 
boolForKey:SKAutoHidePresentationContentsKey])

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