Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/go-widgets/painter v0.13.0
github.com/go-widgets/toolkit v0.307.0
github.com/go-widgets/webcanvas v0.1.0
github.com/go-widgets/window v0.70.0
github.com/go-widgets/window v0.73.0
)

require (
Expand All @@ -21,7 +21,7 @@ require (
github.com/ebitengine/purego v0.11.0 // indirect
github.com/go-crdt/collab v0.40.0 // indirect
github.com/go-freedesktop/x11 v0.2.0 // indirect
github.com/go-gtk/gtk4 v0.5.0 // indirect
github.com/go-gtk/gtk4 v0.6.0 // indirect
github.com/go-icons/iconoir v0.2.0 // indirect
github.com/go-images/images v0.0.0-20260831115433-23d959d868e3 // indirect
github.com/go-macos/appkit v0.5.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ github.com/go-freedesktop/x11 v0.2.0 h1:qHvov5jn7GG4QxeealqRJVj72/MjR5qi2IXqyD7N
github.com/go-freedesktop/x11 v0.2.0/go.mod h1:a+Fma9oOlsagw0CJKe+VHYxIl5/PzPSmlCVaYCtUSYA=
github.com/go-gfx/gfx v0.19.0 h1:nA2Eg8Aq2kytR5Hrm/eQ6618w4vT0+Ao8BMZiuYh84c=
github.com/go-gfx/gfx v0.19.0/go.mod h1:VAK6hgCgkhT3j3ek2K7G8zDfkCPD3RCF45UbcRlCV8Q=
github.com/go-gtk/gtk4 v0.5.0 h1:97/WDULZ3cVIYldSIPT9FV7GBkEf4cOMunF7nsIODNk=
github.com/go-gtk/gtk4 v0.5.0/go.mod h1:jjaA29sFQTpy2D3N+FrnxMFZq07mG48ahgQoEEECpPA=
github.com/go-gtk/gtk4 v0.6.0 h1:piXUsvHo1FWJtgEz5ogowyvXlMskchAbiryeNJPKEmw=
github.com/go-gtk/gtk4 v0.6.0/go.mod h1:jjaA29sFQTpy2D3N+FrnxMFZq07mG48ahgQoEEECpPA=
github.com/go-icons/iconoir v0.2.0 h1:I5AnDEIPgYfawTmwzemDRJjlYCUbFHuS8GJXrjADhXc=
github.com/go-icons/iconoir v0.2.0/go.mod h1:Td/M2vy4xdVv4aOudAskV0nXR9Wv0MlhWvyRIzPBz5U=
github.com/go-images/images v0.0.0-20260831115433-23d959d868e3 h1:SinmtXWpA4a30ZQ5A9QI9YrsYvytmLGeTRVbXqqEezw=
Expand Down Expand Up @@ -58,8 +58,8 @@ github.com/go-widgets/toolkit v0.307.0 h1:4qqLLJjEK6uoYdQTDt90Y70ufgTrlr7YMT73eW
github.com/go-widgets/toolkit v0.307.0/go.mod h1:tpn/Pcd+kra6UnIe8LPwaZWYQaCvvatYXrbuMJyoBfc=
github.com/go-widgets/webcanvas v0.1.0 h1:fSGllghHlFZSC7CBb1oetj/PKR/S3ds/piDrpr0Kmg0=
github.com/go-widgets/webcanvas v0.1.0/go.mod h1:UAoPu9dO6ZzcFFwQbVeW4Jm4X67XFKVJab9A6qWwsMM=
github.com/go-widgets/window v0.70.0 h1:ix9TAmEmCt+PvsYscrZiQm20l2KcT65QnQZ/U3Yav/4=
github.com/go-widgets/window v0.70.0/go.mod h1:DGE3u3flDSWvDZiZhwqLz3IEV9kKq0Tjj8cdFD9CrQo=
github.com/go-widgets/window v0.73.0 h1:b8E/z2sytRPNpRt2lt80xjwcPHIjarF1QABGBjVs454=
github.com/go-widgets/window v0.73.0/go.mod h1:96cemkkeQgHVoBGzWLyPa/1HwCF5LETehCb99+7LsLY=
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
Expand Down
7 changes: 6 additions & 1 deletion native.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var galleryControls = []galleryControl{
{name: "Link", kind: toolkit.NativeLink, text: "a hyperlink"},
{name: "Date", kind: toolkit.NativeDate, text: "2026-09-01"},
{name: "Color", kind: toolkit.NativeColor, text: "#3366cc"},
{name: "List", kind: toolkit.NativeList, items: []string{"First", "Second", "Third", "Fourth"}, num: 1},
}

// nativeControls lays the showcased controls out in two columns, each row a
Expand All @@ -66,10 +67,14 @@ func nativeControls() []toolkit.NativeControl {
Kind: toolkit.NativeLabel, Key: "cap:" + s.name, Visible: true,
Text: s.name + ":", Rect: toolkit.Rect{X: x, Y: y + 4, W: labelW, H: ctlH},
})
ch := ctlH
if s.kind == toolkit.NativeList {
ch = 120 // a list needs room for several rows
}
out = append(out, toolkit.NativeControl{
Kind: s.kind, Key: "ctl:" + s.name, Visible: true,
Text: s.text, On: s.on, Number: s.num, Min: s.min, Max: s.max, Items: s.items,
Rect: toolkit.Rect{X: x + labelW, Y: y, W: ctlW, H: ctlH},
Rect: toolkit.Rect{X: x + labelW, Y: y, W: ctlW, H: ch},
})
}
return out
Expand Down