diff --git a/services/tui_service.py b/services/tui_service.py index 96bdbdc..a899bce 100644 --- a/services/tui_service.py +++ b/services/tui_service.py @@ -551,30 +551,27 @@ class TUIFramework(App): def _generate_css(self): - """动态生成 CSS — 标题 + 状态栏 + 主内容 + 底部输入""" + """动态生成 CSS — dock 布局:标题 + 状态栏 + 主内容 + 底部输入""" return """ - Screen { - layout: grid; - grid-size: 1 4; - grid-rows: auto auto 1fr 3; - } - #monitor-area { + dock: top; padding: 1 1 0 1; background: $panel; color: $text; + height: auto; + } + + #input-area { + dock: bottom; + padding: 0 1; + height: 3; + align: center bottom; } #main-area { overflow-y: auto; scrollbar-size: 1 1; border: solid $primary; - min-height: 10; - } - - #input-area { - padding: 0 1; - align: center bottom; } ScrollableContainer {