mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-29 02:21:43 +00:00
config: add window-step-resize option
This commit is contained in:
@@ -82,6 +82,7 @@ struct PrimaryView: View {
|
||||
self.window.title = newValue
|
||||
}
|
||||
.onChange(of: cellSize) { newValue in
|
||||
if !ghostty.windowStepResize { return }
|
||||
guard let size = newValue else { return }
|
||||
self.window.contentResizeIncrements = size
|
||||
}
|
||||
|
||||
@@ -97,6 +97,15 @@ extension Ghostty {
|
||||
return String(cString: ptr)
|
||||
}
|
||||
|
||||
/// Whether to resize windows in discrete steps or use "fluid" resizing
|
||||
var windowStepResize: Bool {
|
||||
guard let config = self.config else { return true }
|
||||
var v = false
|
||||
let key = "window-step-resize"
|
||||
_ = ghostty_config_get(config, &v, key, UInt(key.count))
|
||||
return v
|
||||
}
|
||||
|
||||
/// The background opacity.
|
||||
var backgroundOpacity: Double {
|
||||
guard let config = self.config else { return 1 }
|
||||
|
||||
Reference in New Issue
Block a user