From b806b45bae5e3e5d1aa21d92c4c6670aea65e3ab Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 16 Jan 2024 11:57:21 -0800 Subject: [PATCH] macos: use UIColor for iOS --- macos/Sources/Ghostty/Ghostty.Config.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macos/Sources/Ghostty/Ghostty.Config.swift b/macos/Sources/Ghostty/Ghostty.Config.swift index cf402355c..641cca917 100644 --- a/macos/Sources/Ghostty/Ghostty.Config.swift +++ b/macos/Sources/Ghostty/Ghostty.Config.swift @@ -202,7 +202,13 @@ extension Ghostty { var rgb: UInt32 = 0 let bg_key = "background" if (!ghostty_config_get(config, &rgb, bg_key, UInt(bg_key.count))) { + #if os(macOS) return Color(NSColor.windowBackgroundColor) + #elseif os(iOS) + return Color(UIColor.systemBackground) + #else + #error("unsupported") + #endif } let red = Double(rgb & 0xff)