Relayout open windows on terminal resize

NAWS mid-session updates now propagate to the window stack: Application
re-runs each open window's relayout on resize. Window#relayout re-centers
(clamped to the screen edge) by shifting all descendants; MasterDetail
recomputes its full geometry and re-renders the detail at the new width.
ButtonBar placement is extracted into ButtonBar.place for reuse.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 17:11:27 +02:00
parent 4d38046c70
commit db8a97b365
4 changed files with 82 additions and 33 deletions

View File

@@ -236,6 +236,7 @@ module BBS
@next = FrameBuffer.new(c, r)
relayout!
@windows.each { |w| w.relayout(self) } if resized
@next.fill(x: 1, y: 1, width: c, height: r, sgr: @theme[:screen])
@root.render(@next)