From 4aed217fd865c7e2ac271790e33e6b558b01f7a0 Mon Sep 17 00:00:00 2001 From: Nikolay Plyusnin Date: Mon, 17 Jun 2024 21:57:02 +0300 Subject: [PATCH] [dotnet, inlays] support AFTER_LINE_END inlays in rider GitOrigin-RevId: b31ef5562404c4540486accc7597b76fa0fd201c --- .../hints/presentation/PresentationFactory.kt | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/PresentationFactory.kt b/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/PresentationFactory.kt index 59ae12716a52..28787fe9378d 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/PresentationFactory.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/presentation/PresentationFactory.kt @@ -126,22 +126,7 @@ class PresentationFactory(private val editor: Editor) : InlayPresentationFactory } @Contract(pure = true) - fun adjustToNextTextEqualWidth(base: InlayPresentation): InlayPresentation { - return DynamicInsetPresentation(base, object : InsetValueProvider { - - fun getInset(roundUp: Boolean): Int { - val spaceWidth = EditorUtil.getPlainSpaceWidth(editor) - val additionalWidth = spaceWidth - base.width % spaceWidth - return if (roundUp) (additionalWidth + 1) / 2 else additionalWidth / 2 - } - - override val left: Int - get() = getInset(true) - - override val right: Int - get() = getInset(false) - }) - } + fun offsetFromTopForSmallText(base: InlayPresentation) = DynamicInsetPresentation(base, offsetFromTopProvider) @Contract(pure = true) override fun icon(icon: Icon): IconPresentation = IconPresentation(icon, editor.component)