Add light and dark to the macOS title bar option

This commit is contained in:
pagedown
2021-12-21 15:14:08 +08:00
parent 58b7fb41d9
commit 278477b387
11 changed files with 38 additions and 15 deletions

View File

@@ -680,7 +680,7 @@ def allow_hyperlinks(x: str) -> int:
return 1 if to_bool(x) else 0
def macos_titlebar_color(x: str) -> int:
def titlebar_color(x: str) -> int:
x = x.strip('"')
if x == 'system':
return 0
@@ -689,6 +689,15 @@ def macos_titlebar_color(x: str) -> int:
return (color_as_int(to_color(x)) << 8) | 2
def macos_titlebar_color(x: str) -> int:
x = x.strip('"')
if x == 'light':
return -1
if x == 'dark':
return -2
return titlebar_color(x)
def macos_option_as_alt(x: str) -> int:
x = x.lower()
if x == 'both':