Revision: 12653
          http://sourceforge.net/p/skim-app/code/12653
Author:   hofman
Date:     2021-12-28 00:27:28 +0000 (Tue, 28 Dec 2021)
Log Message:
-----------
Use custom cursors for temporary tool modes

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2021-12-28 00:15:39 UTC (rev 12652)
+++ trunk/SKPDFView.m   2021-12-28 00:27:28 UTC (rev 12653)
@@ -5218,9 +5218,9 @@
     [menu popUpMenuPositioningItem:nil atLocation:point inView:self];
 }
 
-- (NSCursor *)cursorForNoteToolMode {
+- (NSCursor *)cursorForNoteType:(SKNoteType)noteType {
     if (useToolModeCursors) {
-        switch (annotationMode) {
+        switch (noteType) {
             case SKFreeTextNote:  return [NSCursor textNoteCursor];
             case SKAnchoredNote:  return [NSCursor anchoredNoteCursor];
             case SKCircleNote:    return [NSCursor circleNoteCursor];
@@ -5306,7 +5306,7 @@
     else if (interactionMode == SKPresentationMode)
         [pdfvFlags.cursorHidden ? [NSCursor emptyCursor] : 
pdfvFlags.useArrowCursorInPresentation ? [NSCursor arrowCursor] : [NSCursor 
laserPointerCursorWithColor:laserPointerColor] set];
     else if ((area & SKSpecialToolArea))
-        [[NSCursor arrowCursor] set];
+        [(temporaryToolMode == SKNoToolMode ? [NSCursor arrowCursor] : 
temporaryToolMode == SKZoomToolMode ? [NSCursor zoomInCursor] : [self 
cursorForNoteType:(SKNoteType)temporaryToolMode]) set];
     else if ((area & SKDragArea))
         [[NSCursor openHandCursor] set];
     else if ((area & SKResizeUpDownArea))
@@ -5322,7 +5322,7 @@
     else if (area == kPDFTextFieldArea)
         [[NSCursor IBeamCursor] set];
     else if (toolMode == SKNoteToolMode && (area & kPDFPageArea))
-        [[self cursorForNoteToolMode] set];
+        [[self cursorForNoteType:annotationMode] set];
     else if (toolMode == SKSelectToolMode && (area & kPDFPageArea))
         [[NSCursor crosshairCursor] set];
     else if (toolMode == SKMagnifyToolMode && (area & kPDFPageArea))

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to