Skip to content

Commit

Permalink
making hide function as intended
Browse files Browse the repository at this point in the history
  • Loading branch information
wkaisertexas committed Nov 28, 2023
1 parent 424c2bb commit d0ac56a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@
filePath = "ScreenTimeLapse/PreferencesView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "103"
endingLineNumber = "103"
startingLineNumber = "109"
endingLineNumber = "109"
landmarkName = "previews"
landmarkType = "24">
</BreakpointContent>
Expand Down
2 changes: 2 additions & 0 deletions ScreenTimeLapse/Camera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ class Camera: NSObject, Recordable {
}

sendNotification(title: "\(self) saved", body: "Saved video", url: writer.outputURL)

logger.log("Saved video to \(writer.outputURL.absoluteString)")
} else if writer.status == .failed {
// Asset writing failed with an error
guard let error = writer.error else { return }
Expand Down
8 changes: 7 additions & 1 deletion ScreenTimeLapse/PreferencesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ struct PreferencesView: View {

@ViewBuilder
func captureVideoSettings() -> some View{
Toggle("Hide Icon In Dock", isOn: $hideIcon)
Toggle("Hide Icon In Dock", isOn: $hideIcon).onChange(of: hideIcon){ hide in
if hide {
NSApp.setActivationPolicy(.accessory)
} else {
NSApp.setActivationPolicy(.regular)
}
}
Toggle("Show notifications", isOn: $showNotifications)
Toggle("Show video after saving", isOn: $showAfterSave)

Expand Down
4 changes: 2 additions & 2 deletions ScreenTimeLapse/Screen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ class Screen: NSObject, SCStreamOutput, Recordable {

let config = SCStreamConfiguration()
config.queueDepth = 20
config.width = screen.width * 2
config.height = screen.height * 2
config.width = screen.width
config.height = screen.height
config.showsCursor = showCursor
config.capturesAudio = false
config.backgroundColor = .white
Expand Down
1 change: 1 addition & 0 deletions ScreenTimeLapse/VideoConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ struct VideoConfiguration {
return "Unsupported format"
}
}

}

let baseConfig = VideoConfiguration()

0 comments on commit d0ac56a

Please sign in to comment.