From a8f5680680430cefb5ed22e5a8ef3e34cf54c49b Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Sun, 7 Jul 2024 23:23:58 +0200 Subject: [PATCH] GetWidgetWidth: undo SameLine call by calling NewLine --- Alignment.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Alignment.go b/Alignment.go index c2295d75..8c85a939 100644 --- a/Alignment.go +++ b/Alignment.go @@ -200,6 +200,9 @@ func GetWidgetWidth(w Widget) (result float32) { spacingW, _ := GetItemSpacing() result = float32(GetCursorPos().X-startPos.X) - spacingW + // Undo SameLine (see https://github.com/AllenDang/giu/issues/807) + imgui.NewLine() + // reset drawing cursor position SetCursorPos(currentPos)