mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: remove focused cell size resize increment setter
This commit is contained in:
@ -267,19 +267,10 @@ extension Ghostty {
|
|||||||
@Binding var node: SplitNode?
|
@Binding var node: SplitNode?
|
||||||
@StateObject var container: SplitNode.Container
|
@StateObject var container: SplitNode.Container
|
||||||
|
|
||||||
@EnvironmentObject private var ghostty: Ghostty.AppState
|
|
||||||
|
|
||||||
/// The cell size of the currently focused view. We use this to
|
|
||||||
/// (optionally) set the resizeIncrements binding for the SplitView
|
|
||||||
@FocusedValue(\.ghosttySurfaceCellSize) private var focusedCellSize
|
|
||||||
|
|
||||||
/// Resize increments used by the split view
|
|
||||||
@State private var resizeIncrements: NSSize = .init(width: 1.0, height: 1.0)
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
SplitView(
|
SplitView(
|
||||||
container.direction,
|
container.direction,
|
||||||
resizeIncrements: resizeIncrements,
|
resizeIncrements: .init(width: 1, height: 1),
|
||||||
resizePublisher: container.resizeEvent,
|
resizePublisher: container.resizeEvent,
|
||||||
left: {
|
left: {
|
||||||
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = container.direction == .horizontal ? \.right : \.bottom
|
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = container.direction == .horizontal ? \.right : \.bottom
|
||||||
@ -302,11 +293,6 @@ extension Ghostty {
|
|||||||
])
|
])
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.onChange(of: focusedCellSize) { newValue in
|
|
||||||
guard let increments = newValue else { return }
|
|
||||||
guard ghostty.windowStepResize else { return }
|
|
||||||
self.resizeIncrements = increments
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func closeableTopLeft() -> Binding<SplitNode?> {
|
private func closeableTopLeft() -> Binding<SplitNode?> {
|
||||||
|
Reference in New Issue
Block a user