fix: 日志区改用 dock 布局自动占满剩余空间
- monitor-area: dock top - input-area: dock bottom, height 3 - main-area: 自动填充中间所有空白 - 去掉 grid 布局避免高度塌缩 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+10
-13
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user