mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-17 15:21:50 +00:00
macos: plumb through the split divider color
This commit is contained in:
@@ -3,11 +3,10 @@ import SwiftUI
|
||||
extension SplitView {
|
||||
/// The split divider that is rendered and can be used to resize a split view.
|
||||
struct Divider: View {
|
||||
@EnvironmentObject var ghostty: Ghostty.App
|
||||
|
||||
let direction: SplitViewDirection
|
||||
let visibleSize: CGFloat
|
||||
let invisibleSize: CGFloat
|
||||
let color: Color
|
||||
|
||||
private var visibleWidth: CGFloat? {
|
||||
switch (direction) {
|
||||
@@ -45,14 +44,6 @@ extension SplitView {
|
||||
}
|
||||
}
|
||||
|
||||
private var color: Color {
|
||||
let backgroundColor = NSColor(ghostty.config.backgroundColor)
|
||||
let isLightBackground = backgroundColor.isLightColor
|
||||
let newColor = isLightBackground ? backgroundColor.shadow(withLevel: 0.1) : backgroundColor.shadow(withLevel: 0.4)
|
||||
|
||||
return Color(nsColor: newColor ?? .gray.withAlphaComponent(0.5))
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color.clear
|
||||
|
Reference in New Issue
Block a user