From b1643e5e2a41c3cfc478a1186f37dba84b0d28b5 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 16 Oct 2019 20:29:17 +0200 Subject: [PATCH] layout: skip Flex and Stack Layout when scanning format string Signed-off-by: Elias Naur --- layout/format.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/layout/format.go b/layout/format.go index 60aff13a..d3dd4063 100644 --- a/layout/format.go +++ b/layout/format.go @@ -211,7 +211,9 @@ loop: for { switch peek(state) { case ')': - st.Layout(gtx, children...) + if state.skip == 0 { + st.Layout(gtx, children...) + } return case ',': expect(state, ",") @@ -291,7 +293,9 @@ loop: for { switch peek(state) { case ')': - fl.Layout(gtx, children...) + if state.skip == 0 { + fl.Layout(gtx, children...) + } return case ',': expect(state, ",")