فهرست منبع

【幻灯片】更换鼠标样式

dinglingui 5 ماه پیش
والد
کامیت
710bb4b996

+ 6 - 1
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/KMPresentationTopViewController.swift

@@ -154,8 +154,13 @@ public class KMPresentationTopViewController: NSViewController, KMDrawViewDelega
     
     @IBAction func drawColorPickerViewAction(_ sender: Any) {
          let borderColor = textColorPickerView.color
+        if(isSelectionPre == true) {
+            typeButton.image = NSImage(named: "KMPresentationImageNameType")
+            isSelectionPre = false
+        }
+        undoButton.isEnabled = false
+        
         delegate?.presentationTopViewDrawColor?(self, withView: textColorPickerView, color: borderColor)
-
     }
     
     // MARK: - Notification

+ 12 - 0
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/PresentImage.xcassets/KMPresentationImageNameMouse.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "ic.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 91 - 0
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/PresentImage.xcassets/KMPresentationImageNameMouse.imageset/ic.pdf

@@ -0,0 +1,91 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 1.000000 0.150757 cm
+0.152276 0.234759 0.385445 scn
+10.606602 14.849243 m
+14.849242 10.606603 l
+12.717514 8.474874 l
+8.474874 12.717515 l
+10.606602 14.849243 l
+h
+9.889087 12.717515 m
+12.717514 9.889088 l
+13.435029 10.606603 l
+10.606602 13.435030 l
+9.889087 12.717515 l
+h
+7.767767 12.010408 m
+1.414214 5.656856 l
+0.000000 0.000001 l
+5.656854 1.414214 l
+12.010407 7.767768 l
+7.767767 12.010408 l
+h
+7.767767 10.596195 m
+2.317178 5.145606 l
+1.374368 1.374370 l
+5.145605 2.317178 l
+10.596194 7.767768 l
+7.767767 10.596195 l
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  595
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000685 00000 n
+0000000707 00000 n
+0000000880 00000 n
+0000000954 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1013
+%%EOF

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -289,7 +289,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
 
         if(CGRectContainsPoint(self.bounds, tPoint)) {
             if(self.presentationDrawView && self.presentationDrawView.isHidden == NO) {
-                NSImage *cursorImage = [[NSImage imageNamed:@"CPDFListViewImageNameCursorsLinkDestination"] copy];
+                NSImage *cursorImage = [[NSImage imageNamed:@"KMPresentationImageNameMouse"] copy];
                 NSCursor * cursor = [[NSCursor alloc] initWithImage:cursorImage hotSpot:NSMakePoint(8.0, 8.0)];
                 [cursor set];
             } else {
@@ -303,7 +303,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
         NSPoint tPoint = [event locationInView:self];
         if(CGRectContainsPoint(self.bounds, tPoint)) {
             if(self.presentationDrawView && self.presentationDrawView.isHidden == NO) {
-                NSImage *cursorImage = [[NSImage imageNamed:@"CPDFListViewImageNameCursorsLinkDestination"] copy];
+                NSImage *cursorImage = [[NSImage imageNamed:@"KMPresentationImageNameMouse"] copy];
                 NSCursor * cursor = [[NSCursor alloc] initWithImage:cursorImage hotSpot:NSMakePoint(8.0, 8.0)];
                 [cursor set];