mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 15:06:56 +07:00
[dotnet, inlays] support AFTER_LINE_END inlays in rider
GitOrigin-RevId: b31ef5562404c4540486accc7597b76fa0fd201c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
01a0db3047
commit
4aed217fd8
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user