Browse Source

Remove the Print Website feature from the home screen.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 1 month ago
parent
commit
207669c3f8
2 changed files with 1 additions and 40 deletions
  1. 0 38
      smart_printer/FeatureIcons.swift
  2. 1 2
      smart_printer/ViewController.swift

+ 0 - 38
smart_printer/FeatureIcons.swift

@@ -4,7 +4,6 @@ enum FeatureIconKind {
     case scanFile
     case printText
     case printContacts
-    case printWebsite
     case drawPrint
     case ocrFile
 }
@@ -36,7 +35,6 @@ final class FeatureIconView: NSView {
         case .scanFile: drawScanFile(in: context)
         case .printText: drawPrintText(in: context)
         case .printContacts: drawPrintContacts(in: context)
-        case .printWebsite: drawPrintWebsite(in: context)
         case .drawPrint: drawDrawPrint(in: context)
         case .ocrFile: drawOCRFile(in: context)
         }
@@ -168,42 +166,6 @@ final class FeatureIconView: NSView {
         context.fillEllipse(in: CGRect(x: personCenter.x - layout.dim(0.14), y: personCenter.y + layout.dim(0.02), width: layout.dim(0.28), height: layout.dim(0.22)))
     }
 
-    // MARK: - Print Website
-
-    private func drawPrintWebsite(in context: CGContext) {
-        let layout = IconLayout(bounds: bounds)
-
-        let globeRect = layout.rect(0.08, 0.08, 0.84, 0.84)
-        drawSoftShadow(in: context, rect: globeRect.insetBy(dx: 0, dy: -layout.dim(0.03)), radius: layout.dim(0.03))
-
-        let blueTop = NSColor(red: 0.40, green: 0.70, blue: 1.0, alpha: 1)
-        let blueBottom = NSColor(red: 0.16, green: 0.44, blue: 0.92, alpha: 1)
-        fillGradient(in: context, path: CGPath(ellipseIn: globeRect, transform: nil), colors: [blueTop.cgColor, blueBottom.cgColor], start: CGPoint(x: globeRect.midX, y: globeRect.minY), end: CGPoint(x: globeRect.midX, y: globeRect.maxY))
-
-        context.setStrokeColor(NSColor.white.withAlphaComponent(0.55).cgColor)
-        context.setLineWidth(layout.dim(0.018))
-        context.strokeEllipse(in: globeRect.insetBy(dx: globeRect.width * 0.15, dy: 0))
-        context.strokeEllipse(in: globeRect.insetBy(dx: 0, dy: globeRect.height * 0.22))
-        context.move(to: CGPoint(x: globeRect.minX, y: globeRect.midY))
-        context.addLine(to: CGPoint(x: globeRect.maxX, y: globeRect.midY))
-        context.strokePath()
-
-        let cursorSize = layout.dim(0.22)
-        let cursorOrigin = CGPoint(x: layout.fill.maxX - layout.dim(0.12), y: layout.fill.minY + layout.fill.height * 0.42)
-        context.setFillColor(NSColor.white.cgColor)
-        let cursor = CGMutablePath()
-        cursor.move(to: cursorOrigin)
-        cursor.addLine(to: CGPoint(x: cursorOrigin.x, y: cursorOrigin.y + cursorSize))
-        cursor.addLine(to: CGPoint(x: cursorOrigin.x + cursorSize * 0.35, y: cursorOrigin.y + cursorSize * 0.72))
-        cursor.closeSubpath()
-        context.addPath(cursor)
-        context.fillPath()
-        context.setStrokeColor(NSColor(red: 0.30, green: 0.50, blue: 0.90, alpha: 1).cgColor)
-        context.setLineWidth(layout.dim(0.02))
-        context.addPath(cursor)
-        context.strokePath()
-    }
-
     // MARK: - Draw & Print
 
     private func drawDrawPrint(in context: CGContext) {

+ 1 - 2
smart_printer/ViewController.swift

@@ -730,8 +730,7 @@ class ViewController: NSViewController {
             FeatureCardData(title: "Print Text", subtitle: "Type text and print", iconKind: .printText),
             FeatureCardData(title: "Print Contacts", subtitle: "Print your contacts", iconKind: .printContacts),
             FeatureCardData(title: "Draw & Print", subtitle: "Add drawings, text and more", iconKind: .drawPrint),
-            FeatureCardData(title: "OCR File", subtitle: "Scan and print text from images", iconKind: .ocrFile),
-            FeatureCardData(title: "Print Website", subtitle: "Print any website", iconKind: .printWebsite)
+            FeatureCardData(title: "OCR File", subtitle: "Scan and print text from images", iconKind: .ocrFile)
         )
 
         let grid = makeFeatureGrid(features: features, columns: AppTheme.featureGridColumns)