Skip to content

Commit

Permalink
Disable changing the color scheme for the "High Contrast" theme
Browse files Browse the repository at this point in the history
  • Loading branch information
alex999990009 committed Dec 17, 2024
1 parent ada17a5 commit 69c9ffd
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/main/kotlin/org/arend/ArendStartupActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ import com.intellij.openapi.actionSystem.ActionManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.runReadAction
import com.intellij.openapi.components.service
import com.intellij.openapi.editor.colors.EditorColorsManager
import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intellij.openapi.module.Module
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.project.*
import com.intellij.openapi.startup.ProjectActivity
import com.intellij.ui.JBColor
import org.arend.module.ArendModuleType
import org.arend.module.config.ArendModuleConfigService
import org.arend.typechecking.TypeCheckingService
Expand Down Expand Up @@ -79,7 +76,6 @@ class ArendStartupActivity : ProjectActivity {
})

disableActions()
changeColors()
}

private fun disableActions() {
Expand All @@ -96,13 +92,4 @@ class ArendStartupActivity : ProjectActivity {
}
TypedHandlerDelegate.EP_NAME.point.unregisterExtension(SelectionQuotingTypedHandler::class.java)
}

private fun changeColors() {
val colorManager = EditorColorsManager.getInstance()
val highContrastColorScheme = colorManager.getScheme("_@user_High contrast") ?: return
val inlayDefaultTextColor = TextAttributesKey.createTextAttributesKey("INLAY_DEFAULT")
val attributes = highContrastColorScheme.getAttributes(inlayDefaultTextColor)
attributes.foregroundColor = JBColor.YELLOW
highContrastColorScheme.setAttributes(inlayDefaultTextColor, attributes)
}
}

0 comments on commit 69c9ffd

Please sign in to comment.