Fix overlay windows not inheriting the per-window padding and margin settings of their parents
Fixes #6063
This commit is contained in:
parent
66804dafe8
commit
fccd776732
@ -69,6 +69,9 @@ Detailed list of changes
|
||||
|
||||
- hints kitten: Allow copying matches to named buffers (:disc:`6073`)
|
||||
|
||||
- Fix overlay windows not inheriting the per-window padding and margin settings
|
||||
of their parents (:iss:`6063`)
|
||||
|
||||
|
||||
0.27.1 [2023-02-07]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -282,9 +282,12 @@ class Layout:
|
||||
self, all_windows: WindowList, window: WindowType, location: Optional[str] = None,
|
||||
overlay_for: Optional[int] = None, put_overlay_behind: bool = False
|
||||
) -> None:
|
||||
if overlay_for is not None and overlay_for in all_windows:
|
||||
all_windows.add_window(window, group_of=overlay_for, head_of_group=put_overlay_behind)
|
||||
return
|
||||
if overlay_for is not None:
|
||||
underlay = all_windows.id_map.get(overlay_for)
|
||||
if underlay is not None:
|
||||
window.margin, window.padding = underlay.margin.copy(), underlay.padding.copy()
|
||||
all_windows.add_window(window, group_of=overlay_for, head_of_group=put_overlay_behind)
|
||||
return
|
||||
if location == 'neighbor':
|
||||
location = 'after'
|
||||
self.add_non_overlay_window(all_windows, window, location)
|
||||
|
||||
@ -508,6 +508,9 @@ class EdgeWidths:
|
||||
def serialize(self) -> Dict[str, Optional[float]]:
|
||||
return {'left': self.left, 'right': self.right, 'top': self.top, 'bottom': self.bottom}
|
||||
|
||||
def copy(self) -> 'EdgeWidths':
|
||||
return EdgeWidths(self.serialize())
|
||||
|
||||
|
||||
class GlobalWatchers:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user