fix:修复显示

This commit is contained in:
spiritlhl
2025-11-03 17:56:55 +08:00
parent 2042bff9d4
commit f72273a001
5 changed files with 12 additions and 8 deletions

View File

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

View File

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

View File

@@ -12,6 +12,10 @@ type CustomTheme struct{}
var _ fyne.Theme = (*CustomTheme)(nil)
func (m *CustomTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color {
// 禁用状态的文字也使用深色显示(而不是默认的淡色)
if name == theme.ColorNameDisabled {
return theme.DefaultTheme().Color(theme.ColorNameForeground, theme.VariantLight)
}
// 强制使用浅色主题
return theme.DefaultTheme().Color(name, theme.VariantLight)
}

View File

@@ -73,9 +73,9 @@ func (ui *TestUI) createResultTab() fyne.CanvasObject {
)
// 导出按钮
copyButton := widget.NewButton("复制结果", ui.copyResults)
exportButton := widget.NewButton("导出结果", ui.exportResults)
clearButton := widget.NewButton("清空输出", ui.clearResults)
copyButton := widget.NewButton("复制", ui.copyResults)
exportButton := widget.NewButton("导出", ui.exportResults)
clearButton := widget.NewButton("清空", ui.clearResults)
topBar := container.NewBorder(
nil, nil,

View File

@@ -27,7 +27,7 @@ func NewTerminalOutput() *TerminalOutput {
terminal.MultiLine = true
terminal.Wrapping = fyne.TextWrapOff // 禁用自动换行,支持水平滚动
terminal.TextStyle = fyne.TextStyle{Monospace: true}
terminal.Disable() // 禁用编辑
return terminal
}