Fix rounding errors for line positioning in UICodeEditor.

This commit is contained in:
Martín Lucas Golini
2024-07-04 21:32:58 -03:00
parent 8d172f3eb7
commit 7f90b5afb3
6 changed files with 46 additions and 36 deletions

View File

@@ -906,8 +906,9 @@ void AutoCompletePlugin::drawSignatureHelp( UICodeEditor* editor, const Vector2f
curParamRect.getPosition().y },
curParamRect.getSize() } ) ) {
auto offset = editor->getTextPositionOffset( mSignatureHelpPosition );
pos = { startScroll.x - curParam.start * editor->getGlyphWidth() + offset.x,
startScroll.y + offset.y + vdiff };
pos = { static_cast<Float>( startScroll.x - curParam.start * editor->getGlyphWidth() +
offset.x ),
static_cast<Float>( startScroll.y + offset.y + vdiff ) };
boxRect.setPosition( pos );