Skip to content

Commit

Permalink
GetWidgetWidth: undo SameLine call by calling NewLine
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Jul 7, 2024
1 parent 1ab4aac commit a8f5680
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Alignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a8f5680

Please sign in to comment.