diff --git a/ui/ui_actions.go b/ui/ui_actions.go index 81cec7a..2e05eef 100644 --- a/ui/ui_actions.go +++ b/ui/ui_actions.go @@ -217,7 +217,8 @@ func (ui *TestUI) addLogTab() { ui.LogViewer = widget.NewMultiLineEntry() ui.LogViewer.SetPlaceHolder("日志内容将在测试运行时显示...") ui.LogViewer.Wrapping = fyne.TextWrapWord - ui.LogViewer.Disable() // 只读 + // 不使用 Disable(),让文字颜色保持正常 + // ui.LogViewer.Disable() // 只读 // 刷新日志按钮 refreshButton := widget.NewButton("刷新日志", func() { diff --git a/ui/ui_terminal.go b/ui/ui_terminal.go index 9e0570f..bc16183 100644 --- a/ui/ui_terminal.go +++ b/ui/ui_terminal.go @@ -26,7 +26,8 @@ func NewTerminalOutput() *TerminalOutput { terminal.ExtendBaseWidget(terminal) terminal.MultiLine = true terminal.Wrapping = fyne.TextWrapWord - terminal.Disable() // 禁用编辑 + // 使用 ReadOnly 而不是 Disable,这样文字颜色正常 + // terminal.Disable() // 禁用编辑 return terminal }