|
|
@ -177,7 +177,13 @@ class StatusContainerView: NSView { |
|
|
|
|
|
|
|
|
|
|
|
if newWidth != frame.size.width, newWidth > frame.size.width + 2.0 { |
|
|
|
if newWidth != frame.size.width, newWidth > frame.size.width + 2.0 { |
|
|
|
Logger.info("Correcting our width to \(newWidth) and the previous width was \(frame.size.width)") |
|
|
|
Logger.info("Correcting our width to \(newWidth) and the previous width was \(frame.size.width)") |
|
|
|
frame = CGRect(x: frame.origin.x, y: frame.origin.y, width: newWidth, height: frame.size.height) |
|
|
|
// NSView move animation |
|
|
|
|
|
|
|
NSAnimationContext.runAnimationGroup({ context in |
|
|
|
|
|
|
|
context.duration = 0.2 |
|
|
|
|
|
|
|
let newFrame = CGRect(x: frame.origin.x, y: frame.origin.y, width: newWidth, height: frame.size.height) |
|
|
|
|
|
|
|
// The view will animate to the new origin |
|
|
|
|
|
|
|
self.animator().frame = newFrame |
|
|
|
|
|
|
|
}) {} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|