Skip to content

Commit

Permalink
Explicitly call virtual method to be compatible with 192 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
goodwinnk committed Jun 15, 2019
1 parent c4000a0 commit 6d1c036
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/

package org.jetbrains.kotlin.idea.highlighter.markers

import com.intellij.openapi.editor.colors.EditorColorsManager
import com.intellij.openapi.util.ScalableIcon
import com.intellij.ui.LayeredIcon
import com.intellij.util.ui.ColorsIcon
import com.intellij.util.ui.JBUI
import org.jetbrains.kotlin.idea.KotlinIcons
import org.jetbrains.kotlin.idea.highlighter.dsl.DslHighlighterExtension
import javax.swing.Icon

// BUNCH: 182
// BUNCH: as35
// BUNCH: as34
internal fun createDslStyleIcon(styleId: Int): Icon {
val globalScheme = EditorColorsManager.getInstance().globalScheme
val markersColor = globalScheme.getAttributes(DslHighlighterExtension.styleById(styleId)).foregroundColor
val icon = LayeredIcon(2)
val defaultIcon = KotlinIcons.DSL_MARKER_ANNOTATION
icon.setIcon(defaultIcon, 0)
icon.setIcon(
(ColorsIcon(defaultIcon.iconHeight / 2, markersColor) as ScalableIcon).scale(JBUI.pixScale()),
1,
defaultIcon.iconHeight / 2,
defaultIcon.iconWidth / 2
)
return icon
}

0 comments on commit 6d1c036

Please sign in to comment.