Skip to content

Commit 6683c52

Browse files
committed
small fixes
1 parent 2424295 commit 6683c52

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

CodeEdit/Features/SplitView/Views/SplitViewControllerView.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,19 @@ final class SplitViewController: NSSplitViewController {
9898
false
9999
}
100100

101-
override func splitView(_ splitView: NSSplitView, effectiveRect proposedEffectiveRect: NSRect, forDrawnRect drawnRect: NSRect, ofDividerAt dividerIndex: Int) -> NSRect {
101+
override func splitView(
102+
_ splitView: NSSplitView,
103+
effectiveRect proposedEffectiveRect: NSRect,
104+
forDrawnRect drawnRect: NSRect,
105+
ofDividerAt dividerIndex: Int
106+
) -> NSRect {
102107
if showDividers {
103-
super.splitView(splitView, effectiveRect: proposedEffectiveRect, forDrawnRect: drawnRect, ofDividerAt: dividerIndex)
108+
super.splitView(
109+
splitView,
110+
effectiveRect: proposedEffectiveRect,
111+
forDrawnRect: drawnRect,
112+
ofDividerAt: dividerIndex
113+
)
104114
} else {
105115
.zero
106116
}

CodeEdit/Features/StatusBar/Views/StatusBarView.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ struct StatusBarView: View {
6161
private var dragGesture: some Gesture {
6262
return DragGesture.init(coordinateSpace: .global)
6363
.onChanged { value in
64-
// not sure why but -20 seems to give the smoothest performance
65-
proxy.setPosition(of: 0, position: value.location.y - 20 - Self.height)
66-
proxy.setPosition(of: 1, position: value.location.y - 20)
64+
proxy.setPosition(of: 0, position: value.location.y - Self.height / 2)
65+
proxy.setPosition(of: 1, position: value.location.y + Self.height / 2)
6766
}
6867
}
6968
}

0 commit comments

Comments
 (0)