fix: render instance list vertically

This commit is contained in:
QiuSW
2026-07-22 16:42:45 +08:00
parent 1e5565e440
commit d4c5a89e2b
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -160,6 +160,7 @@ func NewShell(theme *material.Theme) *Shell {
s.logDir.SetText(`C:\Users\Public\chub\logs`)
s.closeOnExit.Value = true
s.browserKind.Value = "chrome"
s.list.Axis = layout.Vertical
return s
}
+8
View File
@@ -5,6 +5,7 @@ import (
"testing"
"time"
"gioui.org/layout"
"gioui.org/widget/material"
)
@@ -21,6 +22,13 @@ func TestShellStartsWithSemanticInstanceStatuses(t *testing.T) {
}
}
func TestShellInstanceListScrollsVertically(t *testing.T) {
shell := NewShell(material.NewTheme())
if shell.list.Axis != layout.Vertical {
t.Fatalf("instance list axis = %v, want vertical", shell.list.Axis)
}
}
func TestShellInstanceRowsContainRequiredColumnsAndIndependentActionControls(t *testing.T) {
shell := NewShell(material.NewTheme())
if len(shell.rows) < 2 {