mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
macos: use UIColor for iOS
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user