~eliasnaur/gio-example

e267006635881a74e4f755fd53987f0f9d5cbcb6 — Chris Waldon 3 months ago e7686c9
x/component: add scrollbars to pages

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
1 files changed, 2 insertions(+), 2 deletions(-)

M x/component/main.go
M x/component/main.go => x/component/main.go +2 -2
@@ 548,7 548,7 @@ type Page struct {

	// laying each page out within a layout.List enables scrolling for the page
	// content.
	layout.List
	widget.List
}

var (


@@ 813,7 813,7 @@ func loop(w *app.Window) error {
							}),
							layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
								page := &pages[nav.CurrentNavDestination().(int)]
								return page.List.Layout(gtx, 1, func(gtx C, _ int) D {
								return material.List(th, &page.List).Layout(gtx, 1, func(gtx C, _ int) D {
									return layout.UniformInset(unit.Dp(4)).Layout(gtx, func(gtx layout.Context) layout.Dimensions {
										return page.layout(gtx)
									})