diff --git a/IDE/src/ui/AutoComplete.bf b/IDE/src/ui/AutoComplete.bf index 2147183f..8eccab69 100644 --- a/IDE/src/ui/AutoComplete.bf +++ b/IDE/src/ui/AutoComplete.bf @@ -561,8 +561,8 @@ namespace IDE.ui int drawScreenX = (.)(mWidgetWindow.mX + mWidth - mDocWidth); gApp.GetWorkspaceRectFrom(drawScreenX, mWidgetWindow.mY, 0, 0, var workspaceX, var workspaceY, var workspaceWidth, var workspaceHeight); - float maxWidth = workspaceWidth - drawScreenX - GS!(8); - float newDocWidth = Math.Min(docWidth, workspaceWidth - drawScreenX - GS!(8)); + float maxWidth = workspaceWidth - (drawScreenX - workspaceX) - GS!(8); + float newDocWidth = Math.Min(docWidth, workspaceWidth - (drawScreenX - workspaceX) - GS!(8)); newDocWidth = Math.Max(newDocWidth, GS!(80)); if ((docWidth > maxWidth) || (lineCount > 1)) { diff --git a/IDE/src/ui/PropertiesDialog.bf b/IDE/src/ui/PropertiesDialog.bf index 476ed8d3..8e5dcacc 100644 --- a/IDE/src/ui/PropertiesDialog.bf +++ b/IDE/src/ui/PropertiesDialog.bf @@ -2042,7 +2042,7 @@ namespace IDE.ui let width = GetValueEditWidth(subItem); propEntry.mEditInsets.mRight = GS!(22); browseButton.mLabelYOfs = GS!(-2); - browseButton.Resize(width - GS!(21), GS!(1), GS!(20), subItem.mHeight - 2); + browseButton.Resize(width - GS!(21), GS!(1), GS!(20), Math.Max(subItem.mHeight - 2, 0)); }); subItem.AddWidget(browseButton);