Skip to content

Commit f72273a

Browse files
committed
fix:修复显示
1 parent 2042bff commit f72273a

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

internal/tests/disk.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ func DiskTest(language, testMethod, testPath string, isMultiCheck bool, autoChan
1212
if runtime.GOOS == "android" {
1313
realTestMethod = "disabled"
1414
if language == "en" {
15-
res = "Disk test is not supported on Android platform.\n\n" +
15+
res = "Disk test is not supported on Android platform.\n" +
1616
"Reason: Android security sandbox prevents apps from executing\n" +
1717
"Alternative: Please use Termux to run the binary test from:\n" +
1818
"https://github.com/oneclickvirt/ecs\n"
1919
} else {
20-
res = "Android 平台不支持硬盘测试。\n\n" +
20+
res = "Android 平台不支持硬盘测试。\n" +
2121
"原因:Android 安全沙箱机制禁止应用直接执行外部二进制文件\n" +
2222
"替代方案:请使用 Termux 执行以下项目的二进制文件测试:\n" +
2323
"https://github.com/oneclickvirt/ecs\n"

internal/tests/memory.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ func MemoryTest(language, testMethod string) (realTestMethod, res string) {
1717
if runtime.GOOS == "android" {
1818
realTestMethod = "disabled"
1919
if language == "en" {
20-
res = "Memory test is not supported on Android platform.\n\n" +
20+
res = "Memory test is not supported on Android platform.\n" +
2121
"Reason: Android security sandbox prevents apps from executing\n" +
2222
"Alternative: Please use Termux to run the binary test from:\n" +
2323
"https://github.com/oneclickvirt/ecs\n"
2424
} else {
25-
res = "Android 平台不支持内存测试。\n\n" +
25+
res = "Android 平台不支持内存测试。\n" +
2626
"原因:Android 安全沙箱机制禁止应用直接执行外部二进制文件\n" +
2727
"替代方案:请使用 Termux 执行以下项目的二进制文件测试:\n" +
2828
"https://github.com/oneclickvirt/ecs\n"

ui/theme.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ type CustomTheme struct{}
1212
var _ fyne.Theme = (*CustomTheme)(nil)
1313

1414
func (m *CustomTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color {
15+
// 禁用状态的文字也使用深色显示(而不是默认的淡色)
16+
if name == theme.ColorNameDisabled {
17+
return theme.DefaultTheme().Color(theme.ColorNameForeground, theme.VariantLight)
18+
}
1519
// 强制使用浅色主题
1620
return theme.DefaultTheme().Color(name, theme.VariantLight)
1721
}

ui/ui_main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ func (ui *TestUI) createResultTab() fyne.CanvasObject {
7373
)
7474

7575
// 导出按钮
76-
copyButton := widget.NewButton("复制结果", ui.copyResults)
77-
exportButton := widget.NewButton("导出结果", ui.exportResults)
78-
clearButton := widget.NewButton("清空输出", ui.clearResults)
76+
copyButton := widget.NewButton("复制", ui.copyResults)
77+
exportButton := widget.NewButton("导出", ui.exportResults)
78+
clearButton := widget.NewButton("清空", ui.clearResults)
7979

8080
topBar := container.NewBorder(
8181
nil, nil,

ui/ui_terminal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func NewTerminalOutput() *TerminalOutput {
2727
terminal.MultiLine = true
2828
terminal.Wrapping = fyne.TextWrapOff // 禁用自动换行,支持水平滚动
2929
terminal.TextStyle = fyne.TextStyle{Monospace: true}
30-
30+
terminal.Disable() // 禁用编辑
3131
return terminal
3232
}
3333

0 commit comments

Comments
 (0)