Skip to content

Commit e812b05

Browse files
committed
fix:修复显示问题
1 parent c7f2c28 commit e812b05

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ui/ui_actions.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ func (ui *TestUI) addLogTab() {
217217
ui.LogViewer = widget.NewMultiLineEntry()
218218
ui.LogViewer.SetPlaceHolder("日志内容将在测试运行时显示...")
219219
ui.LogViewer.Wrapping = fyne.TextWrapWord
220-
ui.LogViewer.Disable() // 只读
220+
// 不使用 Disable(),让文字颜色保持正常
221+
// ui.LogViewer.Disable() // 只读
221222

222223
// 刷新日志按钮
223224
refreshButton := widget.NewButton("刷新日志", func() {

ui/ui_terminal.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ func NewTerminalOutput() *TerminalOutput {
2626
terminal.ExtendBaseWidget(terminal)
2727
terminal.MultiLine = true
2828
terminal.Wrapping = fyne.TextWrapWord
29-
terminal.Disable() // 禁用编辑
29+
// 使用 ReadOnly 而不是 Disable,这样文字颜色正常
30+
// terminal.Disable() // 禁用编辑
3031
return terminal
3132
}
3233

0 commit comments

Comments
 (0)