Small fix for max layout with no clients
This commit is contained in:
parent
d6870c56b0
commit
e4b40d40b1
1 changed files with 7 additions and 2 deletions
|
|
@ -921,10 +921,15 @@ class Kuro(BaseTheme):
|
|||
ignore_windows = []
|
||||
if screen_ref and screen_ref.top:
|
||||
logger.warning(f"Updating margins of bar {screen_ref.top} on screen {screen_ref} for layout {layout_ref}")
|
||||
|
||||
# Update margins. Bar should have no margins when there is only one client on screen (Max layout or Columns with 1 window)
|
||||
# and should have margins in all other cases.
|
||||
if isinstance(layout_ref, layout.max.Max):
|
||||
logger.warning(f"Layout clients: {layout_ref.clients}")
|
||||
logger.warning(f"Ignored clients: {ignore_windows}")
|
||||
logger.warning(f"Extra clients: {extra_windows}")
|
||||
if (len(layout_ref.clients) == 0 and len(extra_windows) == 0) or (len(ignore_windows) > 0 and all(w in ignore_windows for w in layout_ref.clients)):
|
||||
screen_ref.top.margin = [8, 8, 0, 8]
|
||||
else:
|
||||
screen_ref.top.margin = [0, 0, 0, 0]
|
||||
elif isinstance(layout_ref, layout.columns.Columns):
|
||||
clients = extra_windows
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue