mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-12-24 12:37:53 +08:00
fix:修复显示
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -27,7 +27,7 @@ func NewTerminalOutput() *TerminalOutput {
|
||||
terminal.MultiLine = true
|
||||
terminal.Wrapping = fyne.TextWrapOff // 禁用自动换行,支持水平滚动
|
||||
terminal.TextStyle = fyne.TextStyle{Monospace: true}
|
||||
|
||||
terminal.Disable() // 禁用编辑
|
||||
return terminal
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user