Add Gio app shells and platform stubs (T-003)

This commit is contained in:
ila
2026-07-16 15:43:03 +08:00
parent 0e20dd76b2
commit 6f920eb457
23 changed files with 668 additions and 15 deletions
+25
View File
@@ -0,0 +1,25 @@
package gio
import (
"image"
"testing"
"gioui.org/layout"
"gioui.org/op"
"gioui.org/unit"
)
func TestAppShellFillsWindow(t *testing.T) {
var operations op.Ops
size := image.Pt(1080, 720)
context := layout.Context{
Ops: &operations,
Metric: unit.Metric{PxPerDp: 1, PxPerSp: 1},
Constraints: layout.Exact(size),
}
dimensions := NewAppShell("Modern").Layout(context, NewTheme())
if dimensions.Size != size {
t.Fatalf("Layout() size = %v, want %v", dimensions.Size, size)
}
}