Slicer: underline element range in addition to bold font (better do it in IDEA code)

This commit is contained in:
Valentin Kipyatkov
2020-04-14 18:17:59 +03:00
parent 03126ba469
commit 64fec54c48
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.renderer.DescriptorRenderer
import org.jetbrains.kotlin.renderer.render
import org.jetbrains.kotlin.resolve.descriptorUtil.isCompanionObject
import org.jetbrains.kotlin.resolve.descriptorUtil.isExtension
import java.awt.Font
// Based on com.intellij.slicer.SliceUsageCellRenderer
object KotlinSliceUsageCellRenderer : SliceUsageCellRendererBase() {
@@ -39,6 +40,10 @@ object KotlinSliceUsageCellRenderer : SliceUsageCellRendererBase() {
attributes = attributes.derive(attributes.style, JBColor.LIGHT_GRAY, attributes.bgColor, attributes.waveColor)
}
if (attributes.fontStyle == Font.BOLD) {
attributes = attributes.derive(attributes.style or SimpleTextAttributes.STYLE_UNDERLINE, null, null, null)
}
append(textChunk.text, attributes)
if (i == 0) {
append(FontUtil.spaceAndThinSpace())