macos: use UIColor for iOS

This commit is contained in:
Mitchell Hashimoto
2024-01-16 11:57:21 -08:00
parent 87933cc631
commit b806b45bae

View File

@ -202,7 +202,13 @@ extension Ghostty {
var rgb: UInt32 = 0 var rgb: UInt32 = 0
let bg_key = "background" let bg_key = "background"
if (!ghostty_config_get(config, &rgb, bg_key, UInt(bg_key.count))) { if (!ghostty_config_get(config, &rgb, bg_key, UInt(bg_key.count))) {
#if os(macOS)
return Color(NSColor.windowBackgroundColor) return Color(NSColor.windowBackgroundColor)
#elseif os(iOS)
return Color(UIColor.systemBackground)
#else
#error("unsupported")
#endif
} }
let red = Double(rgb & 0xff) let red = Double(rgb & 0xff)