2017-05-27 19:43:27 +02:00
|
|
|
//
|
|
|
|
// UnreadIndicatorView.swift
|
|
|
|
// Evergreen
|
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 2/16/16.
|
|
|
|
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Cocoa
|
|
|
|
|
|
|
|
class UnreadIndicatorView: NSView {
|
|
|
|
|
2017-11-25 06:39:59 +01:00
|
|
|
static let unreadCircleDimension = appDelegate.currentTheme.float(forKey: "MainWindow.Timeline.cell.unreadCircleDimension")
|
2017-05-27 19:43:27 +02:00
|
|
|
|
|
|
|
static let bezierPath: NSBezierPath = {
|
|
|
|
let r = NSRect(x: 0.0, y: 0.0, width: unreadCircleDimension, height: unreadCircleDimension)
|
|
|
|
return NSBezierPath(ovalIn: r)
|
|
|
|
}()
|
|
|
|
|
2017-11-25 06:39:59 +01:00
|
|
|
static let unreadCircleColor = appDelegate.currentTheme.color(forKey: "MainWindow.Timeline.cell.unreadCircleColor")
|
2017-05-27 19:43:27 +02:00
|
|
|
|
|
|
|
override func draw(_ dirtyRect: NSRect) {
|
|
|
|
|
|
|
|
UnreadIndicatorView.unreadCircleColor.setFill()
|
|
|
|
UnreadIndicatorView.bezierPath.fill()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|