fix: TUI 布局调整 — 标题恢复 + 增加输入/状态栏高度
- 恢复 Header 标题栏 - 4 行布局: auto(Header) + auto(Monitor) + 1fr(Main) + 5(Input) - 状态栏高度 2→3 行 - 输入栏高度 3→5 行 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import io
|
||||
import time
|
||||
from textual.app import App
|
||||
from textual.containers import Container, ScrollableContainer
|
||||
from textual.widgets import Static, Input
|
||||
from textual.widgets import Static, Input, Header
|
||||
from textual.suggester import Suggester
|
||||
|
||||
try:
|
||||
@@ -551,16 +551,16 @@ class TUIFramework(App):
|
||||
|
||||
|
||||
def _generate_css(self):
|
||||
"""动态生成 CSS — 经典三行布局:状态栏 + 主内容 + 固定底部输入"""
|
||||
"""动态生成 CSS — 标题 + 状态栏 + 主内容 + 底部输入"""
|
||||
return """
|
||||
Screen {
|
||||
layout: grid;
|
||||
grid-size: 1 3;
|
||||
grid-rows: auto 1fr 3;
|
||||
grid-size: 1 4;
|
||||
grid-rows: auto auto 1fr 5;
|
||||
}
|
||||
|
||||
#monitor-area {
|
||||
height: 2;
|
||||
height: 3;
|
||||
padding: 0 1;
|
||||
background: $panel;
|
||||
color: $text;
|
||||
@@ -573,7 +573,7 @@ class TUIFramework(App):
|
||||
}
|
||||
|
||||
#input-area {
|
||||
height: 3;
|
||||
height: 5;
|
||||
border: solid $secondary;
|
||||
padding: 0 1;
|
||||
}
|
||||
@@ -590,7 +590,8 @@ class TUIFramework(App):
|
||||
"""
|
||||
|
||||
def compose(self):
|
||||
"""组合界面 — 状态栏 / 主显示区(日志+消息) / 底部输入栏"""
|
||||
"""组合界面 — 标题 + 状态栏 / 主显示区 / 底部输入栏"""
|
||||
yield Header()
|
||||
yield Container(
|
||||
self.system_monitor,
|
||||
self.plugin_panel,
|
||||
|
||||
Reference in New Issue
Block a user