1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-30 07:55:01 +00:00

Reduce spurious in-window appearances.

This commit is contained in:
Thomas Harte 2021-07-15 19:53:40 -04:00
parent a42848c62f
commit 84547ee1c1

View File

@ -701,7 +701,7 @@ class MachineDocument:
}
// Show or hide activity view as per current state.
updateActivityViewVisibility()
updateActivityViewVisibility(true)
}
}
@ -746,7 +746,7 @@ class MachineDocument:
}
}
private func updateActivityViewVisibility() {
private func updateActivityViewVisibility(_ isAppLaunch : Bool = false) {
if let window = self.windowControllers.first?.window, let activityFader = self.activityFader {
// If in a window, show the activity view transiently to
// acknowledge changes of state. In full screen show it
@ -758,11 +758,10 @@ class MachineDocument:
} else {
activityFader.animateIn()
}
} else {
} else if !isAppLaunch {
activityFader.showTransiently(for: 1.0)
}
let litLEDs = self.leds.filter { $0.value.isLit }
if litLEDs.isEmpty || !window.styleMask.contains(.fullScreen) {
activityFader.animateOut(delay: window.styleMask.contains(.fullScreen) ? 0.2 : 0.0)