From f7117825aebae93414e4b4be8164b7f83c6718d1 Mon Sep 17 00:00:00 2001 From: qinglong Date: Sat, 13 Jun 2026 11:54:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A5=E5=BF=97=E5=8C=BA=E6=94=B9?= =?UTF-8?q?=E7=94=A8=20dock=20=E5=B8=83=E5=B1=80=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8D=A0=E6=BB=A1=E5=89=A9=E4=BD=99=E7=A9=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - monitor-area: dock top - input-area: dock bottom, height 3 - main-area: 自动填充中间所有空白 - 去掉 grid 布局避免高度塌缩 Co-Authored-By: Claude --- services/tui_service.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) 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 {