Add an option single_window_margin_width to allow different margins when only a single window is visible in the layout

Fixes #688
This commit is contained in:
Kovid Goyal
2018-06-29 09:56:05 +05:30
parent 65fef81f29
commit e35c3cc913
5 changed files with 25 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ def create_layout(cls, opts=None, border_width=2):
if opts is None:
opts = defaults
mw, pw = map(pt_to_px, (opts.window_margin_width, opts.window_padding_width))
ans = cls(1, 1, mw, pw, border_width)
ans = cls(1, 1, mw, mw, pw, border_width)
ans.set_active_window_in_os_window = lambda idx: None
ans.swap_windows_in_os_window = lambda a, b: None
return ans