From 81796464efd443a9aa86c28c06f7419af30d4188 Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Tue, 29 Mar 2022 18:33:36 -0400 Subject: [PATCH] Cleanup unused mouse tracking code. --- .../Rate Controller/UpcomingEventView.swift | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/Clocker/Panel/Rate Controller/UpcomingEventView.swift b/Clocker/Panel/Rate Controller/UpcomingEventView.swift index 9c4209c..7bd1026 100644 --- a/Clocker/Panel/Rate Controller/UpcomingEventView.swift +++ b/Clocker/Panel/Rate Controller/UpcomingEventView.swift @@ -2,38 +2,6 @@ import Cocoa -class UpcomingEventView: NSView { - private var trackingArea: NSTrackingArea? - - override func mouseEntered(with event: NSEvent) { - super.mouseEntered(with: event) - let dismissalButton = subviews.filter { $0.tag == 55 }.first - if let firstMatch = dismissalButton, firstMatch.isHidden { - firstMatch.isHidden = false - } - } - - override func mouseExited(with event: NSEvent) { - super.mouseExited(with: event) - let dismissalButton = subviews.filter { $0.tag == 55 }.first - if let firstMatch = dismissalButton, !firstMatch.isHidden { - firstMatch.isHidden = true - } - } - - override func updateTrackingAreas() { - super.updateTrackingAreas() - - if let trackingArea = self.trackingArea { - removeTrackingArea(trackingArea) - } - - let options: NSTrackingArea.Options = [.mouseEnteredAndExited, .activeAlways] - let trackingArea = NSTrackingArea(rect: bounds, options: options, owner: self, userInfo: nil) - addTrackingArea(trackingArea) - } -} - class ModernSliderContainerView: NSView { private var trackingArea: NSTrackingArea? public var currentlyInFocus = false