refactor(home): 优化主页布局和运行控制面板

- 将主页左右布局改为弹性布局,左侧程序列表占2/5宽度,右侧控制区域占3/5宽度
- 移除程序列表组件的固定宽度设置,使其能够自适应布局
- 在运行控制面板中添加主轴最小尺寸限制以优化空间使用
- 移除暂停/继续按钮中的占位按钮,简化按钮逻辑
- 修改开始/继续按钮为暂停/继续按钮,支持运行中状态切换
- 更新按钮图标和文字根据当前运行状态动态显示
- 移除运行状态指示器,精简界面元素
This commit is contained in:
Developer
2026-06-04 17:22:38 +08:00
parent 37d2af70b7
commit 736c36a98e
3 changed files with 24 additions and 74 deletions

View File

@@ -93,20 +93,24 @@ class _HomePageState extends ConsumerState<HomePage>
padding: const EdgeInsets.all(20),
child: Row(
children: [
// 左侧:程序列表(运行时锁定)
Opacity(
opacity: runState.status == RunStatus.idle ? 1.0 : 0.6,
child: IgnorePointer(
ignoring: runState.status != RunStatus.idle,
child: const ProgramList(),
// 左侧:程序列表(运行时锁定),占 2/5 宽度
Expanded(
flex: 2,
child: Opacity(
opacity: runState.status == RunStatus.idle ? 1.0 : 0.6,
child: IgnorePointer(
ignoring: runState.status != RunStatus.idle,
child: const ProgramList(),
),
),
),
const SizedBox(width: 20),
// 右侧:运行控制区域
// 右侧:运行控制区域,占 3/5 宽度
Expanded(
flex: 3,
child: Column(
children: [
const Expanded(child: RunningControlPanel()),
const RunningControlPanel(),
if (runState.status != RunStatus.idle) ...[
const SizedBox(height: 16),
const Expanded(child: RunStatusMonitor()),