summaryrefslogtreecommitdiff
path: root/platform/platform-impl/src/com/intellij/codeInsight/daemon/impl/HintUtil.kt
diff options
context:
space:
mode:
Diffstat (limited to 'platform/platform-impl/src/com/intellij/codeInsight/daemon/impl/HintUtil.kt')
-rw-r--r--platform/platform-impl/src/com/intellij/codeInsight/daemon/impl/HintUtil.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/platform-impl/src/com/intellij/codeInsight/daemon/impl/HintUtil.kt b/platform/platform-impl/src/com/intellij/codeInsight/daemon/impl/HintUtil.kt
new file mode 100644
index 000000000000..661d9bc74cc3
--- /dev/null
+++ b/platform/platform-impl/src/com/intellij/codeInsight/daemon/impl/HintUtil.kt
@@ -0,0 +1,9 @@
+// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
+package com.intellij.codeInsight.daemon.impl
+
+import com.intellij.openapi.editor.Editor
+import kotlin.math.max
+
+object HintUtil {
+ fun getSize(editor: Editor): Float = max(1f, editor.colorsScheme.editorFontSize2D - 1f)
+} \ No newline at end of file