macOS: Allow hiding the titlebar only instead of all window decorations

Thanks to @ntruong for writing cb8279ec54 and  6807411365, the code was very helpful.
This commit is contained in:
Luflosi
2020-01-04 17:34:21 +01:00
parent bbf247c5c0
commit ea1ef709c6
5 changed files with 40 additions and 6 deletions

View File

@@ -662,8 +662,18 @@ Fade the text in inactive windows by the specified amount (a number between
zero and one, with zero being fully faded).
'''))
o('hide_window_decorations', False, long_text=_('''
Hide the window decorations (title-bar and window borders).
def hide_window_decorations(x):
if x == 'titlebar-only':
return 0b10
elif to_bool(x):
return 0b01
return 0b00
o('hide_window_decorations', 'no', option_type=hide_window_decorations, long_text=_('''
Hide the window decorations (title-bar and window borders) with :code:`yes`.
On macOS, :code:`titlebar-only` can be used to only hide the titlebar.
Whether this works and exactly what effect it has depends on the
window manager/operating system.
'''))