mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 22:34:09 +02:00
Adjusted autocomplete window position
This commit is contained in:
parent
a3020720c9
commit
d635b8e67f
1 changed files with 13 additions and 3 deletions
|
@ -1043,7 +1043,9 @@ namespace IDE.ui
|
||||||
mTargetEditWidget.Content.GetTextCoordAtLineChar(line, column, out x, out y);
|
mTargetEditWidget.Content.GetTextCoordAtLineChar(line, column, out x, out y);
|
||||||
|
|
||||||
mTargetEditWidget.Content.GetTextCoordAtCursor(var cursorX, var cursorY);
|
mTargetEditWidget.Content.GetTextCoordAtCursor(var cursorX, var cursorY);
|
||||||
y = Math.Max(y, cursorY);
|
|
||||||
|
if (!mInvokeWidget.mIsAboveText)
|
||||||
|
y = Math.Max(y, cursorY + gApp.mCodeFont.GetHeight() * 0.0f);
|
||||||
|
|
||||||
float screenX;
|
float screenX;
|
||||||
float screenY;
|
float screenY;
|
||||||
|
@ -1167,7 +1169,15 @@ namespace IDE.ui
|
||||||
screenX += mTargetEditWidget.mWidgetWindow.mClientX;
|
screenX += mTargetEditWidget.mWidgetWindow.mClientX;
|
||||||
screenY += mTargetEditWidget.mWidgetWindow.mClientY;
|
screenY += mTargetEditWidget.mWidgetWindow.mClientY;
|
||||||
|
|
||||||
if (screenY >= mInvokeWindow.mY - 8)
|
//if (screenY >= mInvokeWindow.mY - 8)
|
||||||
|
|
||||||
|
int invokeLine = 0;
|
||||||
|
int invokeColumn = 0;
|
||||||
|
if (mInvokeSrcPositions != null)
|
||||||
|
mTargetEditWidget.Content.GetLineCharAtIdx(mInvokeSrcPositions[0], out invokeLine, out invokeColumn);
|
||||||
|
|
||||||
|
int insertLine = line;
|
||||||
|
if ((insertLine != invokeLine) && ((insertLine - invokeLine) * gApp.mCodeFont.GetHeight() < GS!(40)))
|
||||||
{
|
{
|
||||||
mInvokeWidget.mIgnoreMove = true;
|
mInvokeWidget.mIgnoreMove = true;
|
||||||
if (mListWindow != null)
|
if (mListWindow != null)
|
||||||
|
@ -1993,7 +2003,7 @@ namespace IDE.ui
|
||||||
int insertColumn = 0;
|
int insertColumn = 0;
|
||||||
mTargetEditWidget.Content.GetLineCharAtIdx(mTargetEditWidget.Content.CursorTextPos, out insertLine, out insertColumn);
|
mTargetEditWidget.Content.GetLineCharAtIdx(mTargetEditWidget.Content.CursorTextPos, out insertLine, out insertColumn);
|
||||||
|
|
||||||
if (insertLine != invokeLine)
|
if ((insertLine != invokeLine) && ((insertLine - invokeLine) * gApp.mCodeFont.GetHeight() < GS!(40)))
|
||||||
mInvokeWidget.mIsAboveText = true;
|
mInvokeWidget.mIsAboveText = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue