Layout: review r1 fixes

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 12:32:10 -04:00
1 parent 2a232930dd
commit a8412f4f9c
22 files changed
+381 -99

No files matched your search

+13
View File
@@ -105,3 +105,16 @@ func TestDividerSnapshot(t *testing.T) {
})
})
}
func TestDividerLabelTextScale(t *testing.T) {
tt := ui.NewTester(func(c *ui.Context) {
Use(c, Settings{})
ui.Column(c).Width(300).Children(func() { Divider(c, DividerOptions{Label: "Chapter II"}) })
}, 400, 200)
plain, _ := tt.Find("Chapter II")
tt.SetPreferences(ui.Preferences{TextScale: 2})
tt.Frame()
if big, _ := tt.Find("Chapter II"); big.H < 1.8*plain.H {
t.Fatalf("label height %v at 200%%, was %v", big.H, plain.H)
}
}