Revision: 16204
          http://sourceforge.net/p/skim-app/code/16204
Author:   hofman
Date:     2026-05-03 09:13:41 +0000 (Sun, 03 May 2026)
Log Message:
-----------
page rotation for margin of find result

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2026-05-02 23:07:58 UTC (rev 16203)
+++ trunk/SKMainWindowController.m      2026-05-03 09:13:41 UTC (rev 16204)
@@ -1820,7 +1820,9 @@
         selection = [pdfDoc findString:string fromSelection:nil 
withOptions:options];
     if (selection) {
         PDFPage *page = [selection safeFirstPage];
-        [pdfView goToRect:NSInsetRect([selection boundsForPage:page], 0.0, 
-20.0) onPage:page];
+        NSRect rect = [selection boundsForPage:page];
+        rect = ([page rotation] & 180) ? NSInsetRect(rect, -20.0, -10.0) : 
NSInsetRect(rect, -10.0, -20.0);
+        [pdfView goToRect:rect onPage:page];
         [leftSideController.findTableView deselectAll:self];
         [leftSideController.groupedFindTableView deselectAll:self];
         [pdfView setCurrentSelection:selection animate:YES];

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