Skip to content

Commit

Permalink
Merge pull request #813 from gucio321/fix-getWidgetWidth
Browse files Browse the repository at this point in the history
GetWidgetWidth: undo SameLine call by calling NewLine
  • Loading branch information
gucio321 authored Jul 7, 2024
2 parents 17cd711 + a8f5680 commit 0651ee5
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 0651ee5

Please sign in to comment.