1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-10-27 10:23:12 +03:00

GH-374 Use CGFloat.pi instead of M_PI

This commit is contained in:
Tae Won Ha 2017-04-17 11:04:50 +02:00
parent d0340c9daa
commit 7777befa88
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -92,9 +92,9 @@ extension WorkspaceToolButton {
case .top, .bottom:
self.title.draw(at: CGPoint(x: padding.width, y: padding.height))
case .right:
self.title.draw(at: CGPoint(x: padding.height, y: self.bounds.height - padding.width), angle: -CGFloat(M_PI_2))
self.title.draw(at: CGPoint(x: padding.height, y: self.bounds.height - padding.width), angle: -(.pi / 2))
case .left:
self.title.draw(at: CGPoint(x: self.bounds.width - padding.height, y: padding.width), angle: CGFloat(M_PI_2))
self.title.draw(at: CGPoint(x: self.bounds.width - padding.height, y: padding.width), angle: .pi / 2)
}
}
@ -133,6 +133,7 @@ extension WorkspaceToolButton {
default:
return
}
}
@ -175,6 +176,7 @@ extension WorkspaceToolButton {
// MARK: - NSDraggingSource
extension WorkspaceToolButton {
@objc(draggingSession:sourceOperationMaskForDraggingContext:)
func draggingSession(_ session: NSDraggingSession, sourceOperationMaskFor ctc: NSDraggingContext) -> NSDragOperation {
return .move