small rename

This commit is contained in:
Mitchell Hashimoto
2024-10-25 19:23:13 -07:00
parent f4ba95b2c5
commit 3c8fc86d6f
3 changed files with 7 additions and 6 deletions

View File

@ -197,7 +197,7 @@ class QuickTerminalController: BaseTerminalController {
// Run the animation that moves our window into the proper place and makes // Run the animation that moves our window into the proper place and makes
// it visible. // it visible.
NSAnimationContext.runAnimationGroup({ context in NSAnimationContext.runAnimationGroup({ context in
context.duration = ghostty.config.quickTerminalAnimateDuration context.duration = ghostty.config.quickTerminalAnimationDuration
context.timingFunction = .init(name: .easeIn) context.timingFunction = .init(name: .easeIn)
position.setFinal(in: window.animator(), on: screen) position.setFinal(in: window.animator(), on: screen)
}, completionHandler: { }, completionHandler: {
@ -287,7 +287,7 @@ class QuickTerminalController: BaseTerminalController {
} }
NSAnimationContext.runAnimationGroup({ context in NSAnimationContext.runAnimationGroup({ context in
context.duration = ghostty.config.quickTerminalAnimateDuration context.duration = ghostty.config.quickTerminalAnimationDuration
context.timingFunction = .init(name: .easeIn) context.timingFunction = .init(name: .easeIn)
position.setInitial(in: window.animator(), on: screen) position.setInitial(in: window.animator(), on: screen)
}, completionHandler: { }, completionHandler: {

View File

@ -344,10 +344,10 @@ extension Ghostty {
return QuickTerminalScreen(fromGhosttyConfig: str) ?? .main return QuickTerminalScreen(fromGhosttyConfig: str) ?? .main
} }
var quickTerminalAnimateDuration: Double { var quickTerminalAnimationDuration: Double {
guard let config = self.config else { return 0.2 } guard let config = self.config else { return 0.2 }
var v: Double = 0.2 var v: Double = 0.2
let key = "quick-terminal-animate-duration" let key = "quick-terminal-animation-duration"
_ = ghostty_config_get(config, &v, key, UInt(key.count)) _ = ghostty_config_get(config, &v, key, UInt(key.count))
return v return v
} }

View File

@ -1271,8 +1271,9 @@ keybind: Keybinds = .{},
@"quick-terminal-screen": QuickTerminalScreen = .main, @"quick-terminal-screen": QuickTerminalScreen = .main,
/// Duration (in seconds) of the quick terminal enter and exit animation. /// Duration (in seconds) of the quick terminal enter and exit animation.
/// Set it to 0 to disable animation. /// Set it to 0 to disable animation completely. This can be changed at
@"quick-terminal-animate-duration": f64 = 0.2, /// runtime.
@"quick-terminal-animation-duration": f64 = 0.2,
/// Whether to enable shell integration auto-injection or not. Shell integration /// Whether to enable shell integration auto-injection or not. Shell integration
/// greatly enhances the terminal experience by enabling a number of features: /// greatly enhances the terminal experience by enabling a number of features: